From 7a7a6646769e0c0be5d443cf55c04970f90fd230 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Sat, 29 Apr 2023 18:14:22 +1000 Subject: [PATCH] feat(colorschemes)!: persist g:colors_name with the flavor suffix (#458) --- lua/catppuccin/lib/compiler.lua | 5 +++-- lua/catppuccin/lib/vim/compiler.lua | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/catppuccin/lib/compiler.lua b/lua/catppuccin/lib/compiler.lua index f4d32fd1..a0ced28e 100644 --- a/lua/catppuccin/lib/compiler.lua +++ b/lua/catppuccin/lib/compiler.lua @@ -29,9 +29,10 @@ return string.dump(function() vim.o.termguicolors = true if vim.g.colors_name then vim.cmd("hi clear") end vim.o.background = "%s" -vim.g.colors_name = "catppuccin" +vim.g.colors_name = "catppuccin-%s" local h = vim.api.nvim_set_hl]], - flavour == "latte" and "light" or "dark" + flavour == "latte" and "light" or "dark", + flavour ), } if path_sep == "\\" then O.compile_path = O.compile_path:gsub("/", "\\") end diff --git a/lua/catppuccin/lib/vim/compiler.lua b/lua/catppuccin/lib/vim/compiler.lua index 6ca202ef..7cd3593a 100644 --- a/lua/catppuccin/lib/vim/compiler.lua +++ b/lua/catppuccin/lib/vim/compiler.lua @@ -17,8 +17,9 @@ if exists("colors_name") endif set termguicolors set background=%s -let g:colors_name = "catppuccin"]], - (flavour == "latte" and "light" or "dark") +let g:colors_name = "catppuccin-%s"]], + (flavour == "latte" and "light" or "dark"), + flavour ), }