Revert "refactor(#2871, #2886): multi instance: node classes created (#2916)"

This reverts commit 38aac09151.
This commit is contained in:
Alexander Courtis
2024-10-08 18:07:47 +11:00
parent 010ae0365a
commit 50e919426a
43 changed files with 742 additions and 835 deletions

View File

@@ -4,22 +4,21 @@ local ICON_PLACEMENT = require("nvim-tree.enum").ICON_PLACEMENT
local Decorator = require("nvim-tree.renderer.decorator")
---@class (exact) DecoratorCopied: Decorator
---@field icon HighlightedString?
---@field enabled boolean
---@field icon HighlightedString|nil
local DecoratorCopied = Decorator:new()
---Static factory method
---@param opts table
---@param explorer Explorer
---@return DecoratorCopied
function DecoratorCopied:create(opts, explorer)
---@type DecoratorCopied
local o = {
function DecoratorCopied:new(opts, explorer)
local o = Decorator.new(self, {
explorer = explorer,
enabled = true,
hl_pos = HL_POSITION[opts.renderer.highlight_clipboard] or HL_POSITION.none,
icon_placement = ICON_PLACEMENT.none,
}
o = self:new(o) --[[@as DecoratorCopied]]
})
---@cast o DecoratorCopied
return o
end