From 010ae0365aafd6275c478d932515d2e8e897b7bb Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Mon, 7 Oct 2024 15:25:24 +1100 Subject: [PATCH] feat(#2938): add default filesystem_watchers.ignore_dirs = { "/.ccls-cache", "/build", "/node_modules", "/target", } (#2940) * feat(#2938): filesystem_watchers.ignore_dirs defaults to { node_modules } to resolve pathalogical issues * feat(#2938): more filesystem_watchers.ignore_dirs defaults to to resolve pathalogical issues * feat(#2938): more filesystem_watchers.ignore_dirs defaults to to resolve pathalogical issues --- doc/nvim-tree-lua.txt | 17 ++++++++++++++--- lua/nvim-tree.lua | 7 ++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/nvim-tree-lua.txt b/doc/nvim-tree-lua.txt index fcd11da7..3e2f5617 100644 --- a/doc/nvim-tree-lua.txt +++ b/doc/nvim-tree-lua.txt @@ -561,7 +561,12 @@ Following is the default configuration. See |nvim-tree-opts| for details. filesystem_watchers = { enable = true, debounce_delay = 50, - ignore_dirs = {}, + ignore_dirs = { + "/.ccls-cache", + "/build", + "/node_modules", + "/target", + }, }, actions = { use_system_clipboard = true, @@ -1416,8 +1421,14 @@ function returning whether a path should be ignored. Strings must be backslash escaped e.g. `"my-proj/\\.build$"`. See |string-match|. Function is passed an absolute path. Useful when path is not in `.gitignore` or git integration is disabled. - Type: `string[] | fun(path: string): boolean`, Default: `{}` - + Type: `string[] | fun(path: string): boolean`, Default: > + { + "/.ccls-cache", + "/build", + "/node_modules", + "/target", + } +< ============================================================================== 5.13 OPTS: ACTIONS *nvim-tree-opts-actions* diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index c2369a1c..16f2fa33 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -551,7 +551,12 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS filesystem_watchers = { enable = true, debounce_delay = 50, - ignore_dirs = {}, + ignore_dirs = { + "/.ccls-cache", + "/build", + "/node_modules", + "/target", + }, }, actions = { use_system_clipboard = true,