fix: only apply treesitter default links for groups that are not set by the theme or the user

This commit is contained in:
Folke Lemaitre 2022-12-16 19:00:19 +01:00
parent ecae454c30
commit 06d0eadc5e
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040

View File

@ -180,7 +180,11 @@ function M.load(theme)
vim.g.colors_name = "tokyonight"
if ts.new_style() then
M.syntax(ts.defaults)
for group, colors in pairs(ts.defaults) do
if not theme.highlights[group] then
M.highlight(group, colors)
end
end
end
M.syntax(theme.highlights)