feat(explorer): add filesystem watchers (#1304)
* feat(explorer): add experimental watchers This commit introduces watchers to update the tree. This behavior is introduced behind an "filesystem_watchers" option which should prevent instabilities. It will become the default at some point. Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -165,7 +165,9 @@ local function do_paste(node, action_type, action_fn)
|
||||
end
|
||||
|
||||
clipboard[action_type] = {}
|
||||
return require("nvim-tree.actions.reloaders").reload_explorer()
|
||||
if not M.enable_reload then
|
||||
return require("nvim-tree.actions.reloaders").reload_explorer()
|
||||
end
|
||||
end
|
||||
|
||||
local function do_cut(source, destination)
|
||||
@@ -242,6 +244,7 @@ end
|
||||
|
||||
function M.setup(opts)
|
||||
M.use_system_clipboard = opts.actions.use_system_clipboard
|
||||
M.enable_reload = not opts.filesystem_watchers.enable
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user