@@ -3,10 +3,10 @@ error("Cannot require a meta file")
3
3
4
4
local nvim_tree = { api = { decorator = { AbstractDecorator = {} } } }
5
5
6
- --- Custom decorator extends nvim_tree.api.decorator.AbstractDecorator
6
+ --- Custom decorator
7
7
--- It may:
8
8
--- Add icons
9
- --- Set name highlight group
9
+ --- Set highlight group for the name or icons
10
10
--- Override node icon
11
11
--- Class must be created via nvim_tree.api.decorator.create()
12
12
--- Mandatory constructor :new() will be called once per tree render, with no arguments.
@@ -24,46 +24,52 @@ local nvim_tree = { api = { decorator = { AbstractDecorator = {} } } }
24
24
--- Names of predefined decorators or your decorator classes
25
25
--- @alias nvim_tree.api.decorator.Name " Cut" | " Copied" | " Diagnostics" | " Bookmarks" | " Modified" | " Hidden" | " Opened" | " Git" | nvim_tree.api.decorator.AbstractDecorator
26
26
27
- --- Abstract decorator class, your decorator will extend this
27
+ --- Abstract decorator class, your decorator will extend this.
28
28
---
29
29
--- @class (exact ) nvim_tree.api.decorator.AbstractDecorator
30
30
--- @field protected enabled boolean
31
31
--- @field protected highlight_range nvim_tree.api.decorator.HighlightRange
32
32
--- @field protected icon_placement nvim_tree.api.decorator.IconPlacement
33
33
34
- --- Abstract no-args constructor must be implemented
34
+ --- Abstract: no-args constructor must be implemented.
35
35
---
36
36
function nvim_tree .api .decorator .AbstractDecorator :new () end
37
37
38
- --- Must be called from your constructor
39
- ---
40
- --- @class (exact ) nvim_tree.api.decorator.AbstractDecoratorInitArgs
41
- --- @field enabled boolean
42
- --- @field highlight_range nvim_tree.api.decorator.HighlightRange
43
- --- @field icon_placement nvim_tree.api.decorator.IconPlacement
44
- ---
45
- --- @protected
46
- --- @param args nvim_tree.api.decorator.AbstractDecoratorInitArgs
47
- function nvim_tree .api .decorator .AbstractDecorator :init (args ) end
48
-
49
38
--- Abstract: optionally implement to set the node's icon
50
39
---
51
40
--- @param node nvim_tree.api.Node
52
41
--- @return HighlightedString ? icon_node
53
42
function nvim_tree .api .decorator .AbstractDecorator :icon_node (node ) end
54
43
55
- --- Abstract: optionally implement to provide icons and the highlight groups for your icon_placement
44
+ --- Abstract: optionally implement to provide icons and the highlight groups for your icon_placement.
56
45
---
57
46
--- @param node nvim_tree.api.Node
58
47
--- @return HighlightedString[] ? icons
59
48
function nvim_tree .api .decorator .AbstractDecorator :icons (node ) end
60
49
61
- --- Abstract: optionally implement to provide one highlight group to apply to your highlight_range
50
+ --- Abstract: optionally implement to provide one highlight group to apply to your highlight_range.
62
51
---
63
52
--- @param node nvim_tree.api.Node
64
53
--- @return string ? highlight_group
65
54
function nvim_tree .api .decorator .AbstractDecorator :highlight_group (node ) end
66
55
56
+ --- Must be called from your constructor.
57
+ ---
58
+ --- @class (exact ) nvim_tree.api.decorator.AbstractDecoratorInitArgs
59
+ --- @field enabled boolean
60
+ --- @field highlight_range nvim_tree.api.decorator.HighlightRange
61
+ --- @field icon_placement nvim_tree.api.decorator.IconPlacement
62
+ ---
63
+ --- @protected
64
+ --- @param args nvim_tree.api.decorator.AbstractDecoratorInitArgs
65
+ function nvim_tree .api .decorator .AbstractDecorator :init (args ) end
66
+
67
+ --- Define a sign. This should be called in the constructor.
68
+ ---
69
+ --- @protected
70
+ --- @param icon HighlightedString ?
71
+ function nvim_tree .api .decorator .AbstractDecorator :define_sign (icon ) end
72
+
67
73
68
74
--
69
75
-- Example Decorator
0 commit comments