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:
15
lua/nvim-tree/actions/toggle-ignore.lua
Normal file
15
lua/nvim-tree/actions/toggle-ignore.lua
Normal 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
|
||||
Reference in New Issue
Block a user