feat(neo-tree): refresh neotree git status when closing a lazygit terminal

This commit is contained in:
Folke Lemaitre 2023-04-21 23:42:16 +02:00
parent 40983a3269
commit ad214af54d
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -40,6 +40,7 @@ return {
filesystem = {
bind_to_cwd = false,
follow_current_file = true,
use_libuv_file_watcher = true,
},
window = {
mappings = {
@ -55,6 +56,17 @@ return {
},
},
},
config = function(_, opts)
require("neo-tree").setup(opts)
vim.api.nvim_create_autocmd("TermClose", {
pattern = "*lazygit",
callback = function()
if package.loaded["neo-tree.sources.git_status"] then
require("neo-tree.sources.git_status").refresh()
end
end,
})
end,
},
-- search/replace in multiple files