run nvim tree refresh on neogit status change
This commit is contained in:
@@ -168,13 +168,18 @@ end
|
|||||||
function M.refresh_tree()
|
function M.refresh_tree()
|
||||||
if vim.v.exiting ~= vim.NIL then return end
|
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)
|
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
|
if vim.g.nvim_tree_lsp_diagnostics == 1 then
|
||||||
diagnostics.update()
|
vim.schedule(diagnostics.update)
|
||||||
end
|
end
|
||||||
|
|
||||||
if view.win_open() then
|
if view.win_open() then
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ augroup NvimTree
|
|||||||
au WinClosed * lua require'nvim-tree'.on_leave()
|
au WinClosed * lua require'nvim-tree'.on_leave()
|
||||||
endif
|
endif
|
||||||
au ColorScheme * lua require'nvim-tree'.reset_highlight()
|
au ColorScheme * lua require'nvim-tree'.reset_highlight()
|
||||||
au User FugitiveChanged lua require'nvim-tree'.refresh()
|
au User FugitiveChanged,NeogitStatusRefreshed lua require'nvim-tree'.refresh()
|
||||||
if get(g:, 'nvim_tree_tab_open') == 1
|
if get(g:, 'nvim_tree_tab_open') == 1
|
||||||
au TabEnter * lua require'nvim-tree'.tab_change()
|
au TabEnter * lua require'nvim-tree'.tab_change()
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user