@@ -3,7 +3,7 @@ error("Cannot require a meta file")
3
3
4
4
local nvim_tree = { api = { decorator = { BaseDecorator = {} } } }
5
5
6
- --- Create a custom decorator, extending nvim_tree.api.decorator.BaseDecorator
6
+ --- Custom decorator extends nvim_tree.api.decorator.BaseDecorator
7
7
--- It may:
8
8
--- Add icons
9
9
--- Set name highlight group
@@ -24,15 +24,18 @@ local nvim_tree = { api = { decorator = { BaseDecorator = {} } } }
24
24
--- @alias nvim_tree.api.decorator.Name " Cut" | " Copied" | " Diagnostics" | " Bookmarks" | " Modified" | " Hidden" | " Opened" | " Git" | nvim_tree.api.decorator.BaseDecorator
25
25
26
26
--- BaseDecorator Class, your decorator will extend this
27
+ ---
27
28
--- @class (exact ) nvim_tree.api.decorator.BaseDecorator
28
29
--- @field protected enabled boolean
29
30
--- @field protected highlight_range nvim_tree.api.decorator.HighlightRange
30
31
--- @field protected icon_placement nvim_tree.api.decorator.IconPlacement
31
32
32
33
--- No-args constructor must be implemented
34
+ ---
33
35
function nvim_tree .api .decorator .BaseDecorator :new () end
34
36
35
37
--- Must be called from your constructor
38
+ ---
36
39
--- @class (exact ) nvim_tree.api.decorator.InitArgs
37
40
--- @field enabled boolean
38
41
--- @field highlight_range nvim_tree.api.decorator.HighlightRange
@@ -43,20 +46,24 @@ function nvim_tree.api.decorator.BaseDecorator:new() end
43
46
function nvim_tree .api .decorator .BaseDecorator :init (args ) end
44
47
45
48
--- Optionally implement this method to set the node's icon
49
+ ---
46
50
--- @param node nvim_tree.api.Node
47
51
--- @return HighlightedString ? icon_node
48
52
function nvim_tree .api .decorator .BaseDecorator :icon_node (node ) end
49
53
50
54
--- Optionally implement this method to provide icons and the highlight groups for your icon_placement
55
+ ---
51
56
--- @param node nvim_tree.api.Node
52
57
--- @return HighlightedString[] ? icons
53
58
function nvim_tree .api .decorator .BaseDecorator :icons (node ) end
54
59
55
60
--- Optionally implement this method to provide one highlight group to apply to your highlight_range
61
+ ---
56
62
--- @param node nvim_tree.api.Node
57
63
--- @return string ? highlight_group
58
64
function nvim_tree .api .decorator .BaseDecorator :highlight_group (node ) end
59
65
66
+
60
67
--
61
68
-- Example Decorator
62
69
--
0 commit comments