You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lua/nvim-tree/_meta/api/decorator.lua
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
---@meta
2
2
3
+
---#TODO 3241 maybe rename to UserDecorator
4
+
3
5
---@brief
4
6
---Highlighting and icons for nodes are provided by Decorators, see [nvim-tree-icons-highlighting] for an overview. You may provide your own in addition to the builtin decorators.
5
7
---
@@ -37,7 +39,7 @@ local Class = require("nvim-tree.classic")
37
39
---
38
40
---Text or glyphs with optional highlight group names to apply to it.
---@returnnvim_tree.api.decorator.highlighted_string?icon `nil` for no override
74
+
---@returnnvim_tree.api.highlighted_string?icon `nil` for no override
73
75
functionDecorator:icon_node(node) end
74
76
75
77
---
@@ -78,7 +80,7 @@ function Decorator:icon_node(node) end
78
80
---Abstract, optional to implement.
79
81
---
80
82
---@paramnodenvim_tree.api.Node
81
-
---@returnnvim_tree.api.decorator.highlighted_string[]?icons `nil` or empty table for no icons. Only the first glyph of {str} is used when {icon_placement} is `"signcolumn"`
83
+
---@returnnvim_tree.api.highlighted_string[]?icons `nil` or empty table for no icons. Only the first glyph of {str} is used when {icon_placement} is `"signcolumn"`
82
84
functionDecorator:icons(node) end
83
85
84
86
---
@@ -95,7 +97,7 @@ function Decorator:highlight_group(node) end
95
97
---
96
98
---This must be called during your constructor for all icons that you will return from [nvim_tree.api.Decorator:icons()]
97
99
---
98
-
---@paramiconnvim_tree.api.decorator.highlighted_string? does nothing if nil
100
+
---@paramiconnvim_tree.api.highlighted_string? does nothing if nil
@@ -79,7 +79,7 @@ function FileNode:highlighted_icon()
79
79
return { str=str, hl= { hl } }
80
80
end
81
81
82
-
---@returnnvim_tree.api.decorator.highlighted_string name
82
+
---@returnnvim_tree.api.highlighted_string name
83
83
functionFileNode:highlighted_name()
84
84
localhl
85
85
ifvim.tbl_contains(self.explorer.opts.renderer.special_files, self.absolute_path) orvim.tbl_contains(self.explorer.opts.renderer.special_files, self.name) then
0 commit comments