Skip to content

Commit 47156b3

Browse files
committed
feat(#2948): create nvim_tree.api.decorator.UserDecorator class in API, add :extend
1 parent a063280 commit 47156b3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/nvim-tree/_meta/api_decorator.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---@meta
22
error("Cannot require a meta file")
33

4-
local nvim_tree = {}
4+
local nvim_tree = { api = { decorator = {} } }
55

66
---Highlight group range as per nvim-tree.renderer.highlight_*
77
---@alias nvim_tree.api.decorator.HighlightRange "none" | "icon" | "name" | "all"
@@ -18,6 +18,11 @@ local nvim_tree = {}
1818
---@field protected enabled boolean
1919
---@field protected highlight_range nvim_tree.api.decorator.HighlightRange
2020
---@field protected icon_placement nvim_tree.api.decorator.IconPlacement
21+
nvim_tree.api.decorator.UserDecorator = {}
22+
23+
---Create your decorator class
24+
---
25+
function nvim_tree.api.decorator.UserDecorator:extend() end
2126

2227
---Abstract: no-args constructor must be implemented and will be called once per tree render.
2328
---Must set all fields.

0 commit comments

Comments
 (0)