mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
add palettes configuration key
This commit is contained in:
parent
6986ff21ab
commit
711f218756
3 changed files with 16 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ local M = {}
|
||||||
---@field disable_background boolean
|
---@field disable_background boolean
|
||||||
---@field disable_float_background boolean
|
---@field disable_float_background boolean
|
||||||
---@field disable_italics boolean
|
---@field disable_italics boolean
|
||||||
|
---@field palettes table<table>
|
||||||
---@field groups Groups
|
---@field groups Groups
|
||||||
---@field highlight_groups table<string, any>
|
---@field highlight_groups table<string, any>
|
||||||
local defaults = {
|
local defaults = {
|
||||||
|
|
@ -52,6 +53,8 @@ local defaults = {
|
||||||
disable_italics = false,
|
disable_italics = false,
|
||||||
highlight_groups = {},
|
highlight_groups = {},
|
||||||
|
|
||||||
|
palettes = {},
|
||||||
|
|
||||||
groups = {
|
groups = {
|
||||||
background = 'base',
|
background = 'base',
|
||||||
background_nc = '_experimental_nc',
|
background_nc = '_experimental_nc',
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ local variants = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variants = vim.tbl_deep_extend('force', variants, options.palettes)
|
||||||
|
|
||||||
if options.variant == 'main' then
|
if options.variant == 'main' then
|
||||||
return variants.main
|
return variants.main
|
||||||
end
|
end
|
||||||
|
|
|
||||||
11
readme.md
11
readme.md
|
|
@ -65,6 +65,17 @@ require('rose-pine').setup({
|
||||||
disable_float_background = false,
|
disable_float_background = false,
|
||||||
disable_italics = false,
|
disable_italics = false,
|
||||||
|
|
||||||
|
--- @usage palette tables with hex values
|
||||||
|
palettes = {
|
||||||
|
main = {
|
||||||
|
-- You can change an existing color
|
||||||
|
-- base = '#242424',
|
||||||
|
|
||||||
|
-- Or create a new one
|
||||||
|
-- custom = '#FF0000',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
--- @usage string hex value or named color from rosepinetheme.com/palette
|
--- @usage string hex value or named color from rosepinetheme.com/palette
|
||||||
groups = {
|
groups = {
|
||||||
background = 'base',
|
background = 'base',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue