Signed-off-by: Christoph Schmatzler <christoph@schmatzler.com>
This commit is contained in:
2025-11-04 16:11:12 +00:00
parent 7fa8206850
commit c224420060
4 changed files with 41 additions and 14 deletions

View File

@@ -128,10 +128,27 @@
key = "<leader>gg";
action.__raw = ''
function()
require('neogit').open({})
local Terminal = require('toggleterm.terminal').Terminal
local lazygit = Terminal:new({
cmd = "lazygit",
dir = "git_dir",
direction = "float",
float_opts = {
border = "curved",
winblend = 3,
},
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,
on_close = function(term)
vim.cmd("startinsert!")
end,
})
lazygit:toggle()
end
'';
options.desc = "Neogit";
options.desc = "Lazygit (toggleterm)";
}
# l - lsp/formatter
{