@@ -131,7 +131,8 @@ R = refresh: Rescan the filesystem and redraw the tree. Changes
131
131
FILTER *neo-tree-filter*
132
132
/ = filter_as_you_type: Filter the tree recursively, searching for
133
133
files and folders that contain the specified term as
134
- you type. This will fd if it is installed, or find.
134
+ you type. This will use fd if it is installed, or
135
+ find, or which if you are on Windows.
135
136
f = filter_on_submit: Same as above, but does not search until you hit
136
137
enter. Useful if filter_as_you_type is too slow.
137
138
<C-x> = clear_filter: Removes the filter.
@@ -188,7 +189,7 @@ You probably want #2:
188
189
}
189
190
}
190
191
})
191
-
192
+ <
192
193
193
194
194
195
================================================================================
@@ -213,26 +214,25 @@ By hooking into |neo-tree-events|. You can do things like always clear the
213
214
search after opening a file, or define a custom file opener to choose what
214
215
window will be used, or respond to file events like renames and moves.
215
216
216
- By configuring, rearranging, adding, or removing renderers for each node type.
217
- The renderer is a list of components, such as "icon" and "name", which
218
- determines how each node displayed. Use them as lego pieces to build what you
219
- want to see.
220
-
221
- By adding or replacing components. Components are the functions called by the
222
- renderers, and they return the text and highlight group to be displayed. See
223
- | neo-tree-renderers | and | neo-tree-components | for details. If you want to
224
- gether extra data just one per render to be used by a custom component, you can
225
- do so in the "before_render" event (see | neo-tree-events | ), set that data on the
226
- `state ` object, and reference it in the component. See the wiki for some
227
- examples of custom components:
217
+ By configuring, rearranging, adding, or removing | neo-tree-renderers | for each
218
+ node type. The renderer is a list of components, such as "icon" and "name",
219
+ which determines how each node displayed. Use them as lego pieces to build what
220
+ you want to see.
221
+
222
+ By adding or replacing | neo-tree-components | . Components are the functions
223
+ called by the renderers, and they return the text and highlight group to be
224
+ displayed. If you want to gather extra data just once per render to be used by a
225
+ custom component, you can do so in the "before_render" event (see
226
+ | neo-tree-events | ), set that data on the `state ` object, and reference it in the
227
+ component. See the wiki for some examples of custom components:
228
228
https://github.com/nvim-neo-tree/neo-tree.nvim/wiki/Recipes#components
229
229
230
230
231
231
SETUP *neo-tree-setup*
232
232
233
233
To override the defaults or add new functionality, call the setup() function
234
234
with your overrides. For example, to add your own mappings in 'lua' :
235
- >
235
+
236
236
>
237
237
require("neo-tree").setup({
238
238
filesystem = {
@@ -248,9 +248,8 @@ with your overrides. For example, to add your own mappings in 'lua':
248
248
249
249
NOTE: The mappings you define will be merged with the default mappings. If you
250
250
wish to remove a default mapping without overriding it with your own function,
251
- simply assign it to a command that does not exist, such as "none" or "noop".
252
- This will cause it to be skipped and allow any existing global mappings to
253
- work.
251
+ assign it the the string "none". This will cause it to be skipped and allow any
252
+ existing global mappings to work.
254
253
255
254
Run | NeoTreePasteConfig | to dump the fully commented default config in your
256
255
current file. Even if you don't want to use that config as your starting point,
@@ -280,14 +279,14 @@ If you want to use symbols instead of "E", "W", "I", and H", you'll need to
280
279
define those somewhere in your nvim configuration. Here is an example:
281
280
282
281
>
283
- vim.fn.sign_define("LspDiagnosticsSignError",
284
- {text = " ", texthl = "LspDiagnosticsSignError"})
285
- vim.fn.sign_define("LspDiagnosticsSignWarning",
286
- {text = " ", texthl = "LspDiagnosticsSignWarning"})
287
- vim.fn.sign_define("LspDiagnosticsSignInformation",
288
- {text = " ", texthl = "LspDiagnosticsSignInformation"})
289
- vim.fn.sign_define("LspDiagnosticsSignHint",
290
- {text = "", texthl = "LspDiagnosticsSignHint"})
282
+ vim.fn.sign_define("LspDiagnosticsSignError",
283
+ {text = " ", texthl = "LspDiagnosticsSignError"})
284
+ vim.fn.sign_define("LspDiagnosticsSignWarning",
285
+ {text = " ", texthl = "LspDiagnosticsSignWarning"})
286
+ vim.fn.sign_define("LspDiagnosticsSignInformation",
287
+ {text = " ", texthl = "LspDiagnosticsSignInformation"})
288
+ vim.fn.sign_define("LspDiagnosticsSignHint",
289
+ {text = "", texthl = "LspDiagnosticsSignHint"})
291
290
<
292
291
293
292
To disable this feature entirely, set `enable_diagnostics = false` in your
@@ -379,12 +378,19 @@ or clear the filter. The arg is the path of the file opened.
379
378
Fired after a file (or folder) has been renamed. The arg is an table containing
380
379
`source ` and `destination` properties.
381
380
381
+ NOTE: The following events are used internally and not intended for end user
382
+ usage. You can use them if you want, but beware that they may be debounced, and
383
+ the details of how frequently they are fired and what events are dropped will be
384
+ changed without warning.
385
+
382
386
"vim_diagnostic_changed"
383
- Fired on the | DiagnosticChanged | autocmd event. The arg is a table where the keys
384
- are file names and the values are tables with diagnostic counts by severity level.
387
+ Fired on the | DiagnosticChanged | autocmd event. The arg is a table with one
388
+ property: `diagnostics_lookup` , which is a table where the keys are file names
389
+ and the values are tables with diagnostic counts by severity level.
385
390
386
391
"vim_buffer_changed"
387
- Fired on the following autocmd events: | BufDelete | , | BufWritePost | , | BufFilePost | , | BufNew |
392
+ Fired on the following autocmd events: | BufDelete | , | BufWritePost | ,
393
+ | BufFilePost | , | BufNew |
388
394
389
395
"vim_buffer_enter"
390
396
Fired on the following autocmd events: | BufEnter | , | BufWinEnter |
@@ -466,6 +472,7 @@ A component is a function that returns a single text object:
466
472
highlight = "Comment"
467
473
}
468
474
}
475
+ <
469
476
470
477
The only reason to return a list of objects is to use multiple highlight groups.
471
478
These components and renderers are defined per source by passing them in the
@@ -475,8 +482,8 @@ set of components.
475
482
476
483
Each component function is called with the following args:
477
484
`config` The config object defined in the renderer. This is how a component
478
- can be made to be configurable. You may want to that if you want different
479
- behavior in a directory renderer vs a file renderer.
485
+ can be made to be configurable. This is useful if you want different behavior
486
+ in a directory renderer vs a file renderer.
480
487
481
488
`node` The NuiNode object for this node. The properties can vary by source, but
482
489
each one will generally have at least id and name properties.
@@ -488,7 +495,7 @@ Each component function is called with the following args:
488
495
"before_render" event.
489
496
490
497
For example, here is the simplest possible component:
491
- >
498
+
492
499
>
493
500
require("neo-tree").setup({
494
501
filesystem = {
@@ -508,7 +515,7 @@ For example, here is the simplest possible component:
508
515
509
516
For a more complete example, here is the actual built-in `name` component, which
510
517
is much more dynamic and configurable:
511
- >
518
+
512
519
>
513
520
require("neo-tree").setup({
514
521
filesystem = {
0 commit comments