* Reapply "refactor(#2871, #2886): multi instance: node classes created (#2916)"
This reverts commit 50e919426a.
* fix(#2945): stack overflow on api.git.reload or fugitive event
This commit is contained in:
committed by
GitHub
parent
50e919426a
commit
5ad87620ec
@@ -6,21 +6,22 @@ local ICON_PLACEMENT = require("nvim-tree.enum").ICON_PLACEMENT
|
||||
local Decorator = require("nvim-tree.renderer.decorator")
|
||||
|
||||
---@class (exact) DecoratorOpened: Decorator
|
||||
---@field enabled boolean
|
||||
---@field icon HighlightedString|nil
|
||||
local DecoratorOpened = Decorator:new()
|
||||
|
||||
---Static factory method
|
||||
---@param opts table
|
||||
---@param explorer Explorer
|
||||
---@return DecoratorOpened
|
||||
function DecoratorOpened:new(opts, explorer)
|
||||
local o = Decorator.new(self, {
|
||||
function DecoratorOpened:create(opts, explorer)
|
||||
---@type DecoratorOpened
|
||||
local o = {
|
||||
explorer = explorer,
|
||||
enabled = true,
|
||||
hl_pos = HL_POSITION[opts.renderer.highlight_opened_files] or HL_POSITION.none,
|
||||
icon_placement = ICON_PLACEMENT.none,
|
||||
})
|
||||
---@cast o DecoratorOpened
|
||||
}
|
||||
o = self:new(o) --[[@as DecoratorOpened]]
|
||||
|
||||
return o
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user