mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
refactor: palette
This commit is contained in:
parent
4fa5912437
commit
f712b06101
1 changed files with 46 additions and 45 deletions
|
|
@ -1,48 +1,22 @@
|
|||
local palette = {
|
||||
base = '#191724',
|
||||
surface = '#1f1d2e',
|
||||
overlay = '#26233a',
|
||||
inactive = '#555169',
|
||||
subtle = '#6e6a86',
|
||||
text = '#e0def4',
|
||||
love = '#eb6f92',
|
||||
gold = '#f6c177',
|
||||
rose = '#ebbcba',
|
||||
pine = '#31748f',
|
||||
foam = '#9ccfd8',
|
||||
iris = '#c4a7e7',
|
||||
highlight_low = '#21202e',
|
||||
highlight_med = '#403d52',
|
||||
highlight_high = '#524f67',
|
||||
none = 'NONE',
|
||||
}
|
||||
|
||||
if
|
||||
vim.g.rose_pine_variant == 'dawn'
|
||||
or vim.g.rose_pine_variant == 'rose-pine-dawn'
|
||||
then
|
||||
palette = {
|
||||
base = '#faf4ed',
|
||||
surface = '#fffaf3',
|
||||
overlay = '#f2e9de',
|
||||
inactive = '#9893a5',
|
||||
local variants = {
|
||||
main = {
|
||||
base = '#191724',
|
||||
surface = '#1f1d2e',
|
||||
overlay = '#26233a',
|
||||
inactive = '#555169',
|
||||
subtle = '#6e6a86',
|
||||
text = '#575279',
|
||||
love = '#b4637a',
|
||||
gold = '#ea9d34',
|
||||
rose = '#d7827e',
|
||||
pine = '#286983',
|
||||
foam = '#56949f',
|
||||
iris = '#907aa9',
|
||||
highlight_low = '#f4ede8',
|
||||
highlight_med = '#dfdad9',
|
||||
highlight_high = '#cecacd',
|
||||
}
|
||||
elseif
|
||||
vim.g.rose_pine_variant == 'moon'
|
||||
or vim.g.rose_pine_variant == 'rose-pine-moon'
|
||||
then
|
||||
palette = {
|
||||
text = '#e0def4',
|
||||
love = '#eb6f92',
|
||||
gold = '#f6c177',
|
||||
rose = '#ebbcba',
|
||||
pine = '#31748f',
|
||||
foam = '#9ccfd8',
|
||||
iris = '#c4a7e7',
|
||||
highlight_low = '#21202e',
|
||||
highlight_med = '#403d52',
|
||||
highlight_high = '#524f67',
|
||||
},
|
||||
moon = {
|
||||
base = '#232136',
|
||||
surface = '#2a273f',
|
||||
overlay = '#393552',
|
||||
|
|
@ -58,7 +32,34 @@ then
|
|||
highlight_low = '#2a283e',
|
||||
highlight_med = '#44415a',
|
||||
highlight_high = '#56526e',
|
||||
}
|
||||
},
|
||||
dawn = {
|
||||
base = '#faf4ed',
|
||||
surface = '#fffaf3',
|
||||
overlay = '#f2e9de',
|
||||
inactive = '#9893a5',
|
||||
subtle = '#6e6a86',
|
||||
text = '#575279',
|
||||
love = '#b4637a',
|
||||
gold = '#ea9d34',
|
||||
rose = '#d7827e',
|
||||
pine = '#286983',
|
||||
foam = '#56949f',
|
||||
iris = '#907aa9',
|
||||
highlight_low = '#f4ede8',
|
||||
highlight_med = '#dfdad9',
|
||||
highlight_high = '#cecacd',
|
||||
},
|
||||
}
|
||||
|
||||
local palette = variants.main
|
||||
|
||||
if string.match(vim.g.rose_pine_variant or '', 'moon') then
|
||||
palette = variants.moon
|
||||
elseif string.match(vim.g.rose_pine_variant or '', 'dawn') then
|
||||
palette = variants.dawn
|
||||
end
|
||||
|
||||
vim.tbl_deep_extend('force', palette, { none = 'NONE' })
|
||||
|
||||
return palette
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue