Skip to content

Commit

Permalink
Merge pull request #189 from nullchilly/dev
Browse files Browse the repository at this point in the history
fix(compiler): term_colors
  • Loading branch information
pocco81 committed Jul 14, 2022
2 parents cc0d500 + b8c35b7 commit 1435867
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions lua/catppuccin/lib/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ vim.g.colors_name = "catppuccin"]],
end
end
local tbl = vim.tbl_deep_extend("keep", theme.integrations, theme.editor)
tbl = vim.tbl_deep_extend("keep", theme.syntax, tbl)
tbl = vim.tbl_deep_extend("keep", config.custom_highlights, tbl)

for group, color in pairs(tbl) do
Expand All @@ -61,27 +62,9 @@ vim.g.colors_name = "catppuccin"]],
end
end

if config.term_colors then
local colors = {
"overlay0",
"red",
"green",
"yellow",
"blue",
"pink",
"sky",
"text",
"overlay1",
"red",
"green",
"yellow",
"blue",
"pink",
"sky",
"text",
}
for i = 0, 15 do
table.insert(lines, fmt('vim.g.terminal_color_%d = "%s"', i, theme.terminal[colors[i + 1]]))
if config.term_colors == true then
for k, v in pairs(theme.terminal) do
table.insert(lines, fmt('vim.g.%s = "%s"', k, v))
end
end
os.execute(
Expand Down

0 comments on commit 1435867

Please sign in to comment.