chore: move refresh/reloaders into actions.reloaders

This commit is contained in:
kiyan
2022-02-06 16:23:51 +01:00
parent 7b64075bdf
commit 23c95a674f
9 changed files with 84 additions and 73 deletions

View File

@@ -239,7 +239,7 @@ local function setup_vim_commands()
command! NvimTreeClose lua require'nvim-tree'.close()
command! NvimTreeToggle lua require'nvim-tree'.toggle(false)
command! NvimTreeFocus lua require'nvim-tree'.focus()
command! NvimTreeRefresh lua require'nvim-tree.lib'.refresh_tree()
command! NvimTreeRefresh lua require'nvim-tree.actions.reloaders'.reload_explorer()
command! NvimTreeClipboard lua require'nvim-tree.actions.copy-paste'.print_clipboard()
command! NvimTreeFindFile lua require'nvim-tree'.find_file(true)
command! NvimTreeFindFileToggle lua require'nvim-tree'.toggle(true)
@@ -261,8 +261,8 @@ local function setup_autocommands(opts)
""" reset highlights when colorscheme is changed
au ColorScheme * lua require'nvim-tree'.reset_highlight()
au BufWritePost * lua require'nvim-tree.lib'.refresh_tree()
au User FugitiveChanged,NeogitStatusRefreshed lua require'nvim-tree.lib'.reload_git()
au BufWritePost * lua require'nvim-tree.actions.reloaders'.reload_explorer()
au User FugitiveChanged,NeogitStatusRefreshed lua require'nvim-tree.actions.reloaders'.reload_git()
]]
if opts.auto_close then