@@ -10,8 +10,10 @@ Mappings .................... |neo-tree-mappings|
10
10
Filter .................... | neo-tree-filter |
11
11
Configuration ............... | neo-tree-configuration |
12
12
Setup ..................... | neo-tree-setup |
13
+ Component Configs ......... | neo-tree-component-configs |
13
14
Git Status ................ | neo-tree-git-status |
14
15
Diagnostics ............... | neo-tree-diagnostics |
16
+ Indent markers ............ | neo-tree-indent-markers |
15
17
Highlights ................ | neo-tree-highlights |
16
18
Events .................... | neo-tree-events |
17
19
Components and Renderers .. | neo-tree-renderers |
@@ -323,7 +325,36 @@ you still may want to dump it to a blank .lua file just to read it as
323
325
documentation.
324
326
325
327
326
- GIT STATUS *neo-tree-git-status*
328
+ COMPONENT CONFIGS *neo-tree-component-configs*
329
+
330
+ The visual display of a node is made up of a series of components rendered in a
331
+ certain order and with certain configuration options. See | neo-tree-components |
332
+ for a deeper dive into customizing this aspect. If you wish to configure those
333
+ components in a universal way, the best place to do that is in the
334
+ `default_component_configs` section of the config.
335
+
336
+ For example, to add indent markers, you can apply your settings in each renderer
337
+ for each source, or just do it once in the default_component_configs section:
338
+
339
+ >
340
+ require("neo-tree").setup({
341
+ default_component_configs = {
342
+ indent = {
343
+ with_markers = true,
344
+ indent_marker = "│",
345
+ last_indent_marker = "└",
346
+ indent_size = 2,
347
+ },
348
+ },
349
+ })
350
+ <
351
+ See | neo-tree-indent-markers | for more details.
352
+
353
+ The default config has more examples of component configuration, use
354
+ | NeoTreePasteConfig | to view that default config.
355
+
356
+
357
+ GIT STATUS *neo-tree-git-status*
327
358
328
359
By default, Neo-tree will attempt to get the git status for files in the
329
360
current directory. It will use this information to add markers to the right of
@@ -337,7 +368,7 @@ component of your renderer(s).
337
368
See also: | neo-tree-git-status-source |
338
369
339
370
340
- DIAGNOSTICS *neo-tree-diagnostics*
371
+ DIAGNOSTICS *neo-tree-diagnostics*
341
372
342
373
By default, Neo-tree will display diagnostic symbols next to files. It will
343
374
display the highest severity level for files, and errors only for directories.
@@ -359,6 +390,62 @@ To disable this feature entirely, set `enable_diagnostics = false` in your
359
390
config when calling the setup function.
360
391
361
392
393
+ INDENT MARKERS *neo-tree-indent-markers*
394
+
395
+ By default, indent markers (aka indent guides) are disabled. In Neo-tree
396
+ indent is a component, so to enable indent markers, you need configure the
397
+ `indent ` component:
398
+
399
+ ...at the global level:
400
+ >
401
+ require("neo-tree").setup({
402
+ default_component_configs = {
403
+ indent = {
404
+ with_markers = true,
405
+ indent_marker = "│",
406
+ last_indent_marker = "└",
407
+ indent_size = 2,
408
+ },
409
+ },
410
+ })
411
+ <
412
+
413
+ ...or in each renderer:
414
+ >
415
+ require("neo-tree").setup({
416
+ filesystem = {
417
+ renderers = {
418
+ directory = {
419
+ {
420
+ "indent",
421
+ with_markers = true,
422
+ indent_marker = "│",
423
+ last_indent_marker = "└",
424
+ indent_size = 2,
425
+ },
426
+ -- other components
427
+ },
428
+ file = {
429
+ {
430
+ "indent",
431
+ with_markers = true,
432
+ indent_marker = "│",
433
+ last_indent_marker = "└",
434
+ indent_size = 2,
435
+ -- other components
436
+ },
437
+ }
438
+ }
439
+ })
440
+ <
441
+
442
+ You also can change the marker characters. To do this, you need change
443
+ `indent_marker` and `last_indent_marker` settings.
444
+
445
+ To change highlight of indent markers, you need configure `NeoTreeIndentMarker`
446
+ highlight group. By default, it refers to `Normal ` highlight.
447
+
448
+
362
449
HIGHLIGHTS *neo-tree-highlights*
363
450
364
451
The following highlight groups are defined by this plugin. If you set any of
@@ -385,6 +472,8 @@ NeoTreeNormalNC |hi-NormalNC| override in Neo-tree window.
385
472
NeoTreeRootName The name of the root node.
386
473
NeoTreeTitleBar Used for the title bar of pop-ups, when the border-style
387
474
is set to "NC". This is derived from NeoTreeFloatBorder.
475
+ NeoTreeIndentMarker The style of indentation markers (guides). By default,
476
+ the "Normal" highlight is used.
388
477
389
478
390
479
EVENTS *neo-tree-events*
@@ -549,7 +638,10 @@ set of components.
549
638
Each component function is called with the following args:
550
639
`config` The config object defined in the renderer. This is how a component
551
640
can be made to be configurable. This is useful if you want different behavior
552
- in a directory renderer vs a file renderer.
641
+ in a directory renderer vs a file renderer. The config is a combination of any
642
+ options specified in the default_component_configs
643
+ (| neo-tree-default-component-configs | ), which can be overriden by settings
644
+ specified within each renderer config.
553
645
554
646
`node` The NuiNode object for this node. The properties can vary by source, but
555
647
each one will generally have at least id and name properties.
0 commit comments