fix: Gitignore rules not being applied on new nodes. (#415)
This commit is contained in:
@@ -64,6 +64,12 @@ function M.get_icon_state()
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.use_git()
|
||||||
|
return M.get_icon_state().show_git_icon
|
||||||
|
or vim.g.nvim_tree_git_hl == 1
|
||||||
|
or vim.g.nvim_tree_gitignore == 1
|
||||||
|
end
|
||||||
|
|
||||||
function M.nvim_tree_callback(callback_name)
|
function M.nvim_tree_callback(callback_name)
|
||||||
return string.format(":lua require'nvim-tree'.on_keypress('%s')<CR>", callback_name)
|
return string.format(":lua require'nvim-tree'.on_keypress('%s')<CR>", callback_name)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -152,12 +152,10 @@ 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 refresh_git(M.Tree) end
|
||||||
if config.get_icon_state().show_git_icon or vim.g.nvim_tree_git_hl == 1 then
|
|
||||||
git.reload_roots()
|
|
||||||
refresh_git(M.Tree)
|
|
||||||
end
|
|
||||||
|
|
||||||
if vim.g.nvim_tree_lsp_diagnostics == 1 then
|
if vim.g.nvim_tree_lsp_diagnostics == 1 then
|
||||||
diagnostics.update()
|
diagnostics.update()
|
||||||
|
|||||||
Reference in New Issue
Block a user