Skip to content

Commit

Permalink
feat(#2948): create nvim_tree.api.decorator.UserDecorator class in AP…
Browse files Browse the repository at this point in the history
…I, add :extend
  • Loading branch information
alex-courtis committed Dec 1, 2024
1 parent a063280 commit 47156b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/nvim-tree/_meta/api_decorator.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---@meta
error("Cannot require a meta file")

local nvim_tree = {}
local nvim_tree = { api = { decorator = {} } }

---Highlight group range as per nvim-tree.renderer.highlight_*
---@alias nvim_tree.api.decorator.HighlightRange "none" | "icon" | "name" | "all"
Expand All @@ -18,6 +18,11 @@ local nvim_tree = {}
---@field protected enabled boolean
---@field protected highlight_range nvim_tree.api.decorator.HighlightRange
---@field protected icon_placement nvim_tree.api.decorator.IconPlacement
nvim_tree.api.decorator.UserDecorator = {}

---Create your decorator class
---
function nvim_tree.api.decorator.UserDecorator:extend() end

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

0 comments on commit 47156b3

Please sign in to comment.