diff --git a/lua/plugins/toggleterm-nvim.lua b/lua/plugins/toggleterm-nvim.lua index a8dc29d..18f4be3 100644 --- a/lua/plugins/toggleterm-nvim.lua +++ b/lua/plugins/toggleterm-nvim.lua @@ -29,3 +29,18 @@ vim.keymap.set('t', '', [[wincmd l]]) -- vim.keymap.set('n', '', [[ToggleTerm]], { noremap = true, silent = true }) -- vim.keymap.set('t', '', [[ToggleTerm]], { noremap = true, silent = true }) + +-- Custom gitui terminal +local Terminal = require('toggleterm.terminal').Terminal +local gitui = Terminal:new({ + cmd = 'gitui', + direction = 'float', + hidden = true, +}) + +function _gitui_toggle() + gitui:toggle() +end + +vim.api.nvim_set_keymap("n", "G", "lua _gitui_toggle()", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("t", "G", "lua _gitui_toggle()", { noremap = true, silent = true })