From af26b037d367a14293d591f6ce6dcec295232afb Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 15 Mar 2024 21:56:42 -0500 Subject: [PATCH] refactor(nvim): ensure Neogit's status is refreshed on BufEnter --- dots/.config/nvim/lua/plugins/configs/git.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dots/.config/nvim/lua/plugins/configs/git.lua b/dots/.config/nvim/lua/plugins/configs/git.lua index 00ad2644..49650397 100644 --- a/dots/.config/nvim/lua/plugins/configs/git.lua +++ b/dots/.config/nvim/lua/plugins/configs/git.lua @@ -36,6 +36,13 @@ return { end, }) + vim.api.nvim_create_autocmd("BufEnter", { + pattern = "*Neogit*", + callback = function() + require("neogit").dispatch_refresh() + end + }) + ---@type NeogitConfig return { disable_insert_on_commit = "auto",