fix: dont set @ hl groups when nvim < 0.8 (fixes #207)

This commit is contained in:
Folke Lemaitre 2022-09-10 21:28:27 +02:00
parent e0e9f54051
commit dbf43002d6
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040

View File

@ -45,7 +45,11 @@ function M.invert_color(color)
return color
end
---@param group string
function M.highlight(group, color)
if group:sub(1,1) == "@" and vim.fn.has("nvim-0.8") == 0 then
return
end
local hl = { fg = color.fg, bg = color.bg, sp = color.sp, link = color.link }
if color.style and color.style:lower() ~= "none" then
for s in string.gmatch(color.style, "([^,]+)") do