feat(#3292): add nvim_tree.config.filesystem_watchers.whitelist_dirs - strongly recommended for windows#3298
Conversation
|
Thanks, I'm looking. Have a silly question: are white-listed directories (as well as ignored directories) supposed to be plain paths or patterns? I'm asking because matching doesn't seem to work (everything is ignored regardless of whitelist). I see you're using |
They're patterns, as are We need double escapes for backslashes: #3178 (comment) This case is a problem: local expr = 'E:\\Code';
local pat = 'E:\\\\Code';
local ret = vim.fn.match(expr, pat)
print(expr .. " " .. pat .. " match ret=" .. ret)
local pat2 = 'E:\\Code';
local ret2 = vim.fn.match(expr, pat2)
print(expr .. " " .. pat2 .. " NO match ret2=" .. ret2) |
|
I've rewritten the help: please review for clarity: https://github.com/nvim-tree/nvim-tree.lua/pull/3298/changes#diff-b5b2d1abcb86ead5a2319f7e065a7545b834a407cc9f420590d7acebb285fca9 |
|
Thanks, with double escaping the path works well. I've been using the whitelist throughout the day and it does the job! I don't see any unusual memory allocation when browsing non-whitelisted locations. This doesn't fix watcher digging whitelisted dirs, but at least in those dirs not that many events happen to cause memory growth. And updated docs look great, thanks again! |
Thanks for the thorough testing, merging. You can add more {ignore_dirs} that will be still obeyed inside whitelisted. I've had to add a few over the years. |
|
Great, thanks for your work! |
Adds a watcher whitelist.
@andriysavin I'd be most grateful if you thoroughly tested the fix branch
cd /path/to/nvim-tree.lua git pull git checkout fix/3292When you're finished testing: