mirror of https://github.com/sgoudham/nvim.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
643 B
Lua
29 lines
643 B
Lua
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
|
|
palette = require("catppuccin.core.palettes." .. flvr)
|
|
end
|
|
|
|
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
|
|
else
|
|
vim.api.nvim_echo(
|
|
{ { 'Warning: "' .. k .. '" is not a valid catppucin palette color.', "WarningMsg" } },
|
|
true,
|
|
{}
|
|
)
|
|
end
|
|
end
|
|
end
|
|
|
|
return palette
|
|
end
|
|
|
|
return M
|