refacto: move toggle help and filter toggles into actions

also fix explorer to properly remove element on update when filter is
applied
This commit is contained in:
kiyan
2022-02-07 20:43:24 +01:00
parent 230a61db91
commit 47ccc2913f
6 changed files with 40 additions and 33 deletions

View File

@@ -0,0 +1,15 @@
local M = {}
function M.ignored()
local config = require"nvim-tree.explorer.utils".config
config.filter_ignored = not config.filter_ignored
return require'nvim-tree.actions.reloaders'.reload_explorer()
end
function M.dotfiles()
local config = require"nvim-tree.explorer.utils".config
config.filter_dotfiles = not config.filter_dotfiles
return require'nvim-tree.actions.reloaders'.reload_explorer()
end
return M