mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
feat: palette overrides (#307)
* feat: palette overrides * removed option all from palett override * removed dead code forgotten in last commit * fix typo in readme and simplified comment Co-authored-by: not <mvllow@icloud.com> --------- Co-authored-by: not <mvllow@icloud.com>
This commit is contained in:
parent
d97cc7fcd7
commit
94ffdb7748
3 changed files with 20 additions and 0 deletions
|
|
@ -35,6 +35,9 @@ config.options = {
|
|||
transparency = false,
|
||||
},
|
||||
|
||||
---@type table<string, table<string, string>>
|
||||
palette = {},
|
||||
|
||||
---@type table<string, string | PaletteColor>
|
||||
groups = {
|
||||
border = "muted",
|
||||
|
|
|
|||
|
|
@ -62,6 +62,15 @@ local variants = {
|
|||
},
|
||||
}
|
||||
|
||||
if options.palette ~= nil and next(options.palette) then
|
||||
-- handle variant specific overrides
|
||||
for variant_name, override_palette in pairs(options.palette) do
|
||||
if variants[variant_name] then
|
||||
variants[variant_name] = vim.tbl_extend("force", variants[variant_name], override_palette or {})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if variants[options.variant] ~= nil then
|
||||
return variants[options.variant]
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue