@@ -844,6 +844,9 @@ Windows WSL and PowerShell
844844- Executable file detection is disabled as this is non-performant and can
845845 freeze Nvim
846846- Some filesystem watcher error related to permissions will not be reported
847+ - Filesystem watchers can experience severe performance issues. It is strongly
848+ recommended to tightly control watcher usage via
849+ | nvim_tree.config.filesystem_watchers | {whitelist_dirs}
847850
848851Powershell
849852- Observed Nvim hanging after a runaway (infinite) number of events on a
@@ -1693,11 +1696,17 @@ Config: filesystem_watchers *nvim-tree-config-filesystem-watchers*
16931696 directory changes, resulting in better performance.
16941697
16951698 Watchers may be disabled for absolute directory paths via {ignore_dirs}.
1699+ This may be useful when a path is not in `.gitignore` or git integration
1700+ is disabled.
16961701 • A list of | regular-expression | to match a path, backslash escaped e.g.
16971702 `" my-proj/\\ .build$" ` OR
16981703 • A function that is passed an absolute path and returns `true` to disable
1699- This may be useful when a path is not in `.gitignore` or git integration
1700- is disabled.
1704+
1705+ Watchers may be enabled only for specific directories via
1706+ {whitelist_dirs}. When it is empty (default), watchers are enabled for all
1707+ directories. Uses same semantics as {ignore_dirs} except that the function
1708+ returns `true` to enable watchers for that path. This is strongly
1709+ recommended for windows: | nvim-tree-os-specific | .
17011710
17021711 After {max_events} consecutive filesystem events on a single directory
17031712 with an interval < {debounce_delay}:
@@ -1711,6 +1720,9 @@ Config: filesystem_watchers *nvim-tree-config-filesystem-watchers*
17111720 between filesystem change and tree update.
17121721 • {ignore_dirs}? (`string[]|(fun(path: string): boolean)`, default: `{ "/.ccls-cache", "/build", "/node_modules", "/target", "/.zig-cache"}`)
17131722 Disable for specific directories.
1723+ • {whitelist_dirs}? (`string[]|(fun(path: string): boolean)`, default:
1724+ `{}` ) Optionally enable only for specific
1725+ directories, obeying {ignore_dirs}
17141726 • {max_events}? (`integer` , default: `0 ` or `1000 ` on windows)
17151727 Disable for a single directory after {max_events}
17161728 consecutive events with an interval <
@@ -2199,6 +2211,7 @@ Following is the default configuration, see |nvim_tree.config| for details. >lua
21992211 "/target",
22002212 "/.zig-cache",
22012213 },
2214+ whitelist_dirs = {},
22022215 },
22032216 actions = {
22042217 use_system_clipboard = true,
0 commit comments