fix!: add treesitter default groups to theme

This commit is contained in:
Folke Lemaitre
2024-01-20 11:38:46 +01:00
parent 66cfdc12b0
commit bddedb17bd
3 changed files with 51 additions and 303 deletions

View File

@@ -1,5 +1,3 @@
local ts = require("tokyonight.treesitter")
local M = {}
M.bg = "#000000"
@@ -51,10 +49,6 @@ end
---@param group string
function M.highlight(group, hl)
group = ts.get(group)
if not group then
return
end
if hl.style then
if type(hl.style) == "table" then
hl = vim.tbl_extend("force", hl, hl.style)
@@ -189,14 +183,6 @@ function M.load(theme)
vim.o.termguicolors = true
vim.g.colors_name = "tokyonight"
if ts.new_style() then
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)
-- vim.api.nvim_set_hl_ns(M.ns)