diff --git a/lua/catppuccin/core/palettes/init.lua b/lua/catppuccin/core/palettes/init.lua index fc01b70..5d88f0c 100644 --- a/lua/catppuccin/core/palettes/init.lua +++ b/lua/catppuccin/core/palettes/init.lua @@ -3,10 +3,20 @@ local M = {} function M.get_palette() local flvr = vim.g.catppuccin_flavour + local palette = require("catppuccin.core.palettes.mocha") if flvr == "mocha" or flvr == "latte" or flvr == "macchiato" or flvr == "frappe" then - return require("catppuccin.core.palettes." .. flvr) + palette = require("catppuccin.core.palettes." .. flvr) end - return require("catppuccin.core.palettes.mocha") + + if type(vim.g.catppuccin_override_colors) == "table" then + for k, v in pairs(vim.g.catppuccin_override_colors) do + if palette[k] then + palette[k] = v + end + end + end + + return palette end return M