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
cf8de969c4
commit
256d086c21
3 changed files with 20 additions and 0 deletions
|
|
@ -35,6 +35,9 @@ config.options = {
|
||||||
transparency = false,
|
transparency = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
---@type table<string, table<string, string>>
|
||||||
|
palette = {},
|
||||||
|
|
||||||
---@type table<string, string | PaletteColor>
|
---@type table<string, string | PaletteColor>
|
||||||
groups = {
|
groups = {
|
||||||
border = "muted",
|
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
|
if variants[options.variant] ~= nil then
|
||||||
return variants[options.variant]
|
return variants[options.variant]
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,14 @@ require("rose-pine").setup({
|
||||||
h6 = "foam",
|
h6 = "foam",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
pallete = {
|
||||||
|
-- Override the builtin palette per variant
|
||||||
|
-- moon = {
|
||||||
|
-- base = '#18191a',
|
||||||
|
-- overlay = '#363738',
|
||||||
|
-- },
|
||||||
|
},
|
||||||
|
|
||||||
highlight_groups = {
|
highlight_groups = {
|
||||||
-- Comment = { fg = "foam" },
|
-- Comment = { fg = "foam" },
|
||||||
-- VertSplit = { fg = "muted", bg = "muted" },
|
-- VertSplit = { fg = "muted", bg = "muted" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue