From 72f0eddaae65dafc66565e0462adbfd11c74c6bb Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Fri, 12 Nov 2021 19:14:06 -0500 Subject: [PATCH] fix: term colors --- lua/catppuccin/core/mapper.lua | 15 +------------- lua/catppuccin/utils/util.lua | 36 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 32 deletions(-) diff --git a/lua/catppuccin/core/mapper.lua b/lua/catppuccin/core/mapper.lua index 6f62f78..0dae064 100644 --- a/lua/catppuccin/core/mapper.lua +++ b/lua/catppuccin/core/mapper.lua @@ -205,20 +205,7 @@ local function get_integrations() end local function get_terminal() - local g = vim.g - local cp = color_palette - - g.terminal_color_0 = cp.catppuccin0 - g.terminal_color_1 = cp.catppuccin1 - g.terminal_color_2 = cp.catppuccin2 - g.terminal_color_3 = cp.catppuccin3 - g.terminal_color_4 = cp.catppuccin4 - g.terminal_color_5 = cp.catppuccin5 - g.terminal_color_6 = cp.catppuccin6 - g.terminal_color_7 = cp.catppuccin7 - g.terminal_color_8 = cp.catppuccin8 - g.terminal_color_9 = cp.catppuccin9 - g.terminal_color_10 = cp.catppuccin10 + return color_palette end function M.apply() diff --git a/lua/catppuccin/utils/util.lua b/lua/catppuccin/utils/util.lua index 88de6c5..1b58f92 100644 --- a/lua/catppuccin/utils/util.lua +++ b/lua/catppuccin/utils/util.lua @@ -116,24 +116,24 @@ function util.properties(tbl) end end -function util.terminal(clrs) - g.terminal_color_0 = clrs.black - g.terminal_color_1 = clrs.red - g.terminal_color_2 = clrs.green - g.terminal_color_3 = clrs.yellow - g.terminal_color_4 = clrs.blue - g.terminal_color_5 = clrs.magenta - g.terminal_color_6 = clrs.cyan - g.terminal_color_7 = clrs.white - - g.terminal_color_8 = clrs.black_br - g.terminal_color_9 = clrs.red_br - g.terminal_color_10 = clrs.green_br - g.terminal_color_11 = clrs.yellow_br - g.terminal_color_12 = clrs.blue_br - g.terminal_color_13 = clrs.magenta_br - g.terminal_color_14 = clrs.cyan_br - g.terminal_color_15 = clrs.white_br +function util.terminal(cp) + g.terminal_color_0 = cp.catppuccin1 + g.terminal_color_1 = cp.catppuccin5 + g.terminal_color_2 = cp.catppuccin7 + g.terminal_color_3 = cp.catppuccin8 + g.terminal_color_4 = cp.catppuccin9 + g.terminal_color_5 = cp.catppuccin3 + g.terminal_color_6 = cp.catppuccin4 + g.terminal_color_7 = cp.catppuccin0 + + g.terminal_color_8 = cp.catppuccin1 + g.terminal_color_9 = cp.catppuccin5 + g.terminal_color_10 = cp.catppuccin7 + g.terminal_color_11 = cp.catppuccin8 + g.terminal_color_12 = cp.catppuccin9 + g.terminal_color_13 = cp.catppuccin3 + g.terminal_color_14 = cp.catppuccin4 + g.terminal_color_15 = cp.catppuccin0 end function util.load(theme)