Skip to content

Commit ed590b4

Browse files
committed
fix(#3198): document filesystem_watchers.max_events
1 parent 1c64bb2 commit ed590b4

2 files changed

Lines changed: 12 additions & 14 deletions

File tree

doc/nvim-tree-lua.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,6 +1707,10 @@ Windows WSL and PowerShell
17071707
freeze Nvim
17081708
- Some filesystem watcher error related to permissions will not be reported
17091709

1710+
Powershell
1711+
- Observed Nvim hanging after a runaway (infinite) number of events on a
1712+
single directory. See |nvim_tree.config.filesystem_watchers| {max_events}
1713+
17101714
==============================================================================
17111715
netrw *nvim-tree-netrw*
17121716

@@ -2511,15 +2515,11 @@ Config: filesystem_watchers *nvim-tree-config-filesystem-watchers*
25112515
This may be useful when a path is not in `.gitignore` or git integration
25122516
is disabled.
25132517

2514-
On runaway consecutive filesystem events for a single directory with an
2515-
interval < |nvim-tree.filesystem_watchers.debounce_delay|:
2518+
After {max_events} consecutive filesystem events on a single directory
2519+
with an interval < {debounce_delay}:
25162520
• The filesystem watcher will be disabled for that directory.
25172521
• A warning notification will be shown.
2518-
• Consider adding this directory to |filesystem_watchers.ignore_dirs|
2519-
2520-
The runaway threshold is controlled by {max_events} and has been observed
2521-
when running on Windows PowerShell: an infinite number of filesystem
2522-
events were raised and Nvim hangs.
2522+
• Consider adding this directory to {ignore_dirs}
25232523

25242524
Fields: ~
25252525
{enable}? (`boolean`) (default: `true`)
@@ -2528,8 +2528,8 @@ Config: filesystem_watchers *nvim-tree-config-filesystem-watchers*
25282528
• {ignore_dirs}? (`string[]|(fun(path: string): boolean)`, default: `{ "/.ccls-cache", "/build", "/node_modules", "/target", }`)
25292529
Disable for specific directories.
25302530
• {max_events}? (`integer`, default: `100`) Disable for a single
2531-
directory after consecutive events with an interval
2532-
< |nvim-tree.filesystem_watchers.debounce_delay|.
2531+
directory after {max_events} consecutive events
2532+
with an interval < {debounce_delay}.
25332533

25342534

25352535

lua/nvim-tree/_meta/config/filesystem_watchers.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ error("Cannot require a meta file")
1212
--- - A function that is passed an absolute path and returns `true` to disable
1313
---This may be useful when a path is not in `.gitignore` or git integration is disabled.
1414
---
15-
---On runaway consecutive filesystem events for a single directory with an interval < [nvim-tree.filesystem_watchers.debounce_delay]:
15+
---After {max_events} consecutive filesystem events on a single directory with an interval < {debounce_delay}:
1616
---- The filesystem watcher will be disabled for that directory.
1717
---- A warning notification will be shown.
18-
---- Consider adding this directory to [filesystem_watchers.ignore_dirs]
19-
---
20-
---The runaway threshold is controlled by {max_events} and has been observed when running on Windows PowerShell: an infinite number of filesystem events were raised and Nvim hangs.
18+
---- Consider adding this directory to {ignore_dirs}
2119
---
2220
---@class nvim_tree.config.filesystem_watchers
2321
---
@@ -32,6 +30,6 @@ error("Cannot require a meta file")
3230
---(default: `{ "/.ccls-cache", "/build", "/node_modules", "/target", }`)
3331
---@field ignore_dirs? string[]|(fun(path: string): boolean)
3432
---
35-
---Disable for a single directory after consecutive events with an interval < [nvim-tree.filesystem_watchers.debounce_delay].
33+
---Disable for a single directory after {max_events} consecutive events with an interval < {debounce_delay}.
3634
---(default: `100`)
3735
---@field max_events? integer

0 commit comments

Comments
 (0)