add: nvchad

This commit is contained in:
ooks-io 2023-08-21 12:44:33 +12:00
parent 0001c26dcd
commit 4430232787
11 changed files with 845 additions and 8 deletions

View file

@ -0,0 +1,29 @@
local Terminal = require("toggleterm.terminal").Terminal
local M = {}
M.lazygit = Terminal:new({
cmd = "lazygit",
hidden = true,
direction = "float",
float_opts = {
border = "double",
},
-- function to run on opening the terminal
on_open = function(term)
vim.cmd("startinsert!")
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
end,
-- function to run on closing the terminal
on_close = function(_)
vim.cmd("startinsert!")
end,
})
M.htop = Terminal:new({
cmd = "htop",
hidden = true,
direction = "float",
})
return M