@@ -53,6 +53,7 @@ CONTENTS *nvim-tree*
53
53
9. Events | nvim-tree-events |
54
54
10. Prompts | nvim-tree-prompts |
55
55
11. Decorators | nvim-tree-decorators |
56
+ 11.1 Decorator Example | nvim-tree-decorator-example |
56
57
12. OS Specific Restrictions | nvim-tree-os-specific |
57
58
13. Netrw | nvim-tree-netrw |
58
59
14. Legacy | nvim-tree-legacy |
@@ -426,7 +427,7 @@ Following is the default configuration. See |nvim-tree-opts| for details. >lua
426
427
special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
427
428
hidden_display = "none",
428
429
symlink_destination = true,
429
- decorators = { "Git", "Opened ", "Hidden", "Modified", "Bookmarks ", "Diagnostics", "Copied", "Cut", },
430
+ decorators = { "Git", "Open ", "Hidden", "Modified", "Bookmark ", "Diagnostics", "Copied", "Cut", },
430
431
highlight_git = "none",
431
432
highlight_diagnostics = "none",
432
433
highlight_opened_files = "none",
@@ -933,10 +934,10 @@ Uses strings to specify builtin decorators otherwise specify your
933
934
Type: `nvim_tree.api.decorator.Name[]` , Default: >lua
934
935
{
935
936
"Git",
936
- "Opened ",
937
+ "Open ",
937
938
"Hidden",
938
939
"Modified",
939
- "Bookmarks ",
940
+ "Bookmark ",
940
941
"Diagnostics",
941
942
"Copied",
942
943
"Cut",
@@ -2777,26 +2778,25 @@ Decorators may:
2777
2778
- Set highlight group for the name or icons
2778
2779
- Override node icon
2779
2780
2780
- Create your decorator class via `api.decorator.UserDecorator: extend ()` and add it
2781
- to | nvim-tree.renderer.decorators |
2781
+ See `api_decorator.lua ` for decorator class definition and full documentation.
2782
2782
2783
- e.g. default decorators with an user decorator being overridden only by Cut: >lua
2783
+ Specify decorators and their precedence via | nvim-tree.renderer.decorators |
2784
+ e.g. defaults with a user decorator being overridden only by Cut: >lua
2784
2785
{
2785
2786
"Git",
2786
- "Opened ",
2787
+ "Open ",
2787
2788
"Hidden",
2788
2789
"Modified",
2789
- "Bookmarks ",
2790
+ "Bookmark ",
2790
2791
"Diagnostics",
2791
2792
"Copied",
2792
2793
MyDecorator,
2793
2794
"Cut",
2794
2795
}
2795
2796
<
2796
- See `api_decorator.lua ` for decorator class definition and full documentation.
2797
-
2798
- Example decorator: >lua
2799
-
2797
+ ==============================================================================
2798
+ 11.1. DECORATOR EXAMPLE *nvim-tree-decorator-example*
2799
+ >lua
2800
2800
---Create your decorator class
2801
2801
---@class (exact) MyDecorator: nvim_tree.api.decorator.UserDecorator
2802
2802
---@field private my_icon nvim_tree.api.HighlightedString
0 commit comments