fix: check expicitely wether new hl group names are supported by checking for @comment
This commit is contained in:
@@ -45,9 +45,12 @@ function M.invert_color(color)
|
|||||||
return color
|
return color
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- new in 0.8 something
|
||||||
|
local has_new_group_names = vim.fn.hlexists("@comment") ~= 0
|
||||||
|
|
||||||
---@param group string
|
---@param group string
|
||||||
function M.highlight(group, color)
|
function M.highlight(group, color)
|
||||||
if group:sub(1,1) == "@" and vim.fn.has("nvim-0.8") == 0 then
|
if group:sub(1, 1) == "@" and not has_new_group_names then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local hl = { fg = color.fg, bg = color.bg, sp = color.sp, link = color.link }
|
local hl = { fg = color.fg, bg = color.bg, sp = color.sp, link = color.link }
|
||||||
|
|||||||
Reference in New Issue
Block a user