@@ -72,13 +72,67 @@ local config = {
7272 },
7373 },
7474 filesystem = {
75+ bind_to_cwd = true , -- true creates a 2-way binding between vim's cwd and neo-tree's root
76+ -- The renderer section provides the renderers that will be used to render the tree.
77+ -- The first level is the node type.
78+ -- For each node type, you can specify a list of components to render.
79+ -- Components are rendered in the order they are specified.
80+ -- The first field in each component is the name of the function to call.
81+ -- The rest of the fields are passed to the function as the "config" argument.
82+ filtered_items = {
83+ visible = false , -- when true, they will just be displayed differently than normal items
84+ hide_dotfiles = true ,
85+ hide_gitignored = true ,
86+ hide_by_name = {
87+ " .DS_Store" ,
88+ " thumbs.db"
89+ -- "node_modules"
90+ },
91+ never_show = { -- remains hidden even if visible is toggled to true
92+ -- ".DS_Store",
93+ -- "thumbs.db"
94+ },
95+ gitignore_source = " git check-ignored" , -- or "git status", which may be faster in some repos
96+ },
97+ find_by_full_path_words = false , -- `false` means it only searches the tail of a path.
98+ -- `true` will change the filter into a full path
99+ -- search with space as an implicit ".*", so
100+ -- `fi init`
101+ -- will match: `./sources/filesystem/init.lua
102+ -- find_command = "fd",
103+ -- find_args = { -- you can specify extra args to pass to the find command.
104+ -- "--exclude", ".git",
105+ -- "--exclude", "node_modules"
106+ -- },
107+ ---- or use a function instead of list of strings
108+ -- find_args = function(cmd, path, search_term, args)
109+ -- if cmd ~= "fd" then
110+ -- return args
111+ -- end
112+ -- --maybe you want to force the filter to always include hidden files:
113+ -- table.insert(args, "--hidden")
114+ -- -- but no one ever wants to see .git files
115+ -- table.insert(args, "--exclude")
116+ -- table.insert(args, ".git")
117+ -- -- or node_modules
118+ -- table.insert(args, "--exclude")
119+ -- table.insert(args, "node_modules")
120+ -- --here is where it pays to use the function, you can exclude more for
121+ -- --short search terms, or vary based on the directory
122+ -- if string.len(search_term) < 4 and path == "/home/cseickel" then
123+ -- table.insert(args, "--exclude")
124+ -- table.insert(args, "Library")
125+ -- end
126+ -- return args
127+ -- end,
128+ search_limit = 50 , -- max number of search results when using filters
129+ follow_current_file = false , -- This will find and focus the file in the active buffer every time
130+ -- the current file is changed while the tree is open.
75131 hijack_netrw_behavior = " open_default" , -- netrw disabled, opening a directory opens neo-tree
76132 -- in whatever position is specified in window.position
77133 -- "open_split", -- netrw disabled, opening a directory opens within the
78134 -- window like netrw would, regardless of window.position
79135 -- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
80- follow_current_file = false , -- This will find and focus the file in the active buffer every time
81- -- the current file is changed while the tree is open.
82136 use_libuv_file_watcher = false , -- This will use the OS level file watchers to detect changes
83137 -- instead of relying on nvim autocmd events.
84138 window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for
@@ -123,50 +177,6 @@ local config = {
123177 [" q" ] = " close_window" ,
124178 },
125179 },
126- find_by_full_path_words = false , -- `false` means it only searches the tail of a path.
127- -- `true` will change the filter into a full path
128- -- search with space as an implicit ".*", so
129- -- `fi init`
130- -- will match: `./sources/filesystem/init.lua
131- -- find_command = "fd",
132- -- find_args = { -- you can specify extra args to pass to the find command.
133- -- "--exclude", ".git",
134- -- "--exclude", "node_modules"
135- -- },
136- ---- or use a function instead of list of strings
137- -- find_args = function(cmd, path, search_term, args)
138- -- if cmd ~= "fd" then
139- -- return args
140- -- end
141- -- --maybe you want to force the filter to always include hidden files:
142- -- table.insert(args, "--hidden")
143- -- -- but no one ever wants to see .git files
144- -- table.insert(args, "--exclude")
145- -- table.insert(args, ".git")
146- -- -- or node_modules
147- -- table.insert(args, "--exclude")
148- -- table.insert(args, "node_modules")
149- -- --here is where it pays to use the function, you can exclude more for
150- -- --short search terms, or vary based on the directory
151- -- if string.len(search_term) < 4 and path == "/home/cseickel" then
152- -- table.insert(args, "--exclude")
153- -- table.insert(args, "Library")
154- -- end
155- -- return args
156- -- end,
157- search_limit = 50 , -- max number of search results when using filters
158- filters = {
159- show_hidden = false ,
160- respect_gitignore = true ,
161- gitignore_source = " git status" , -- or "git check-ignored", which may be faster in some repos
162- },
163- bind_to_cwd = true , -- true creates a 2-way binding between vim's cwd and neo-tree's root
164- -- The renderer section provides the renderers that will be used to render the tree.
165- -- The first level is the node type.
166- -- For each node type, you can specify a list of components to render.
167- -- Components are rendered in the order they are specified.
168- -- The first field in each component is the name of the function to call.
169- -- The rest of the fields are passed to the function as the "config" argument.
170180 renderers = {
171181 directory = {
172182 { " indent" },
@@ -199,6 +209,7 @@ local config = {
199209 },
200210 },
201211 buffers = {
212+ bind_to_cwd = true ,
202213 window = {
203214 position = " left" ,
204215 width = 40 ,
@@ -219,7 +230,6 @@ local config = {
219230 [" bd" ] = " buffer_delete" ,
220231 },
221232 },
222- bind_to_cwd = true ,
223233 renderers = {
224234 directory = {
225235 { " indent" },
0 commit comments