From dbf43002d66eb77d20786a44b6dba21be49fa900 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 10 Sep 2022 21:28:27 +0200 Subject: [PATCH] fix: dont set @ hl groups when nvim < 0.8 (fixes #207) --- lua/tokyonight/util.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/tokyonight/util.lua b/lua/tokyonight/util.lua index 5f7c203..e08b6ab 100644 --- a/lua/tokyonight/util.lua +++ b/lua/tokyonight/util.lua @@ -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