This reverts commit 38aac09151.
This commit is contained in:
@@ -33,22 +33,20 @@ local ICON_KEYS = {
|
||||
}
|
||||
|
||||
---@class (exact) DecoratorDiagnostics: Decorator
|
||||
---@field icons HighlightedString[]?
|
||||
---@field icons HighlightedString[]
|
||||
local DecoratorDiagnostics = Decorator:new()
|
||||
|
||||
---Static factory method
|
||||
---@param opts table
|
||||
---@param explorer Explorer
|
||||
---@return DecoratorDiagnostics
|
||||
function DecoratorDiagnostics:create(opts, explorer)
|
||||
---@type DecoratorDiagnostics
|
||||
local o = {
|
||||
function DecoratorDiagnostics:new(opts, explorer)
|
||||
local o = Decorator.new(self, {
|
||||
explorer = explorer,
|
||||
enabled = opts.diagnostics.enable,
|
||||
hl_pos = HL_POSITION[opts.renderer.highlight_diagnostics] or HL_POSITION.none,
|
||||
icon_placement = ICON_PLACEMENT[opts.renderer.icons.diagnostics_placement] or ICON_PLACEMENT.none,
|
||||
}
|
||||
o = self:new(o) --[[@as DecoratorDiagnostics]]
|
||||
})
|
||||
---@cast o DecoratorDiagnostics
|
||||
|
||||
if not o.enabled then
|
||||
return o
|
||||
|
||||
Reference in New Issue
Block a user