run nvim tree refresh on neogit status change

This commit is contained in:
kiyan
2021-07-10 14:25:21 +02:00
parent 0a13676f30
commit f178c8c8c5
2 changed files with 10 additions and 5 deletions

View File

@@ -168,13 +168,18 @@ end
function M.refresh_tree()
if vim.v.exiting ~= vim.NIL then return end
local use_git = config.use_git()
if use_git then git.reload_roots() end
refresh_nodes(M.Tree)
if use_git then vim.schedule(function() refresh_git(M.Tree) end) end
local use_git = config.use_git()
if use_git then
vim.schedule(function()
git.reload_roots()
refresh_git(M.Tree)
end)
end
if vim.g.nvim_tree_lsp_diagnostics == 1 then
diagnostics.update()
vim.schedule(diagnostics.update)
end
if view.win_open() then