From ba481ccb9a3ce8ca6ff386ed2a1e5620f3fddd33 Mon Sep 17 00:00:00 2001 From: ralvescosta Date: Sat, 19 Apr 2025 08:44:01 -0300 Subject: [PATCH] feat: lazygit --- lua/custom/plugins/lazygit.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/custom/plugins/lazygit.lua b/lua/custom/plugins/lazygit.lua index 0f783c45..16e5232a 100644 --- a/lua/custom/plugins/lazygit.lua +++ b/lua/custom/plugins/lazygit.lua @@ -6,6 +6,16 @@ return { }, config = function() vim.keymap.set('n', 'tg', ':LazyGit', { silent = true, noremap = true, desc = '[T]oggle [L]azy Git' }) + + vim.api.nvim_create_autocmd('TermClose', { + callback = function(args) + local bufnr = args.buf + local name = vim.api.nvim_buf_get_name(bufnr) + if name:match 'lazygit' then + vim.cmd 'Neotree git_status refresh' + end + end, + }) end, }, }