mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
parent
7c398c943c
commit
64986b857d
3 changed files with 15 additions and 13 deletions
|
|
@ -167,13 +167,14 @@ function M.colorscheme()
|
||||||
|
|
||||||
---@param color string
|
---@param color string
|
||||||
local function get_palette_color(color)
|
local function get_palette_color(color)
|
||||||
|
color = color:lower()
|
||||||
local p = require('rose-pine.palette')
|
local p = require('rose-pine.palette')
|
||||||
|
|
||||||
if color and not color:find('#') then
|
if color and not color:find('#') and color ~= 'none' then
|
||||||
return p[color:lower()]
|
return p[color]
|
||||||
end
|
end
|
||||||
|
|
||||||
return color:lower()
|
return color
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param group string
|
---@param group string
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ local variants = {
|
||||||
highlight_med = '#403d52',
|
highlight_med = '#403d52',
|
||||||
highlight_high = '#524f67',
|
highlight_high = '#524f67',
|
||||||
opacity = 0.1,
|
opacity = 0.1,
|
||||||
|
none = 'NONE',
|
||||||
},
|
},
|
||||||
moon = {
|
moon = {
|
||||||
base = '#232136',
|
base = '#232136',
|
||||||
|
|
@ -34,6 +35,7 @@ local variants = {
|
||||||
highlight_med = '#44415a',
|
highlight_med = '#44415a',
|
||||||
highlight_high = '#56526e',
|
highlight_high = '#56526e',
|
||||||
opacity = 0.1,
|
opacity = 0.1,
|
||||||
|
none = 'NONE',
|
||||||
},
|
},
|
||||||
dawn = {
|
dawn = {
|
||||||
base = '#faf4ed',
|
base = '#faf4ed',
|
||||||
|
|
@ -52,6 +54,7 @@ local variants = {
|
||||||
highlight_med = '#dfdad9',
|
highlight_med = '#dfdad9',
|
||||||
highlight_high = '#cecacd',
|
highlight_high = '#cecacd',
|
||||||
opacity = 0.05,
|
opacity = 0.05,
|
||||||
|
none = 'NONE',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,6 +66,4 @@ else
|
||||||
palette = variants[(vim.g.rose_pine_variant == 'moon' and 'moon') or 'main']
|
palette = variants[(vim.g.rose_pine_variant == 'moon' and 'moon') or 'main']
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.tbl_deep_extend('force', palette, { none = 'NONE' })
|
|
||||||
|
|
||||||
return palette
|
return palette
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,12 @@ function M.get(config)
|
||||||
local theme = {}
|
local theme = {}
|
||||||
local groups = config.groups or {}
|
local groups = config.groups or {}
|
||||||
local styles = {
|
local styles = {
|
||||||
italic = (config.disable_italics and 'NONE') or 'italic',
|
italic = (config.disable_italics and p.none) or 'italic',
|
||||||
vert_split = (config.bold_vert_split and p.surface) or p.none,
|
vert_split = (config.bold_vert_split and groups.border) or p.none,
|
||||||
background = (config.disable_background and p.none) or p.base,
|
background = (config.disable_background and p.none) or p.base,
|
||||||
float_background = (config.disable_float_background and p.none) or p.surface,
|
float_background = (config.disable_float_background and p.none) or p.surface,
|
||||||
nc_background = (config.dim_nc_background and p.surface) or p.base,
|
|
||||||
}
|
}
|
||||||
|
styles.nc_background = (config.dim_nc_background and p.surface) or styles.background
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
ColorColumn = { bg = p.highlight_high },
|
ColorColumn = { bg = p.highlight_high },
|
||||||
|
|
@ -65,15 +65,15 @@ function M.get(config)
|
||||||
SpellLocal = { sp = p.subtle, style = 'undercurl' },
|
SpellLocal = { sp = p.subtle, style = 'undercurl' },
|
||||||
SpellRare = { sp = p.subtle, style = 'undercurl' },
|
SpellRare = { sp = p.subtle, style = 'undercurl' },
|
||||||
SignColumn = { fg = p.text, bg = styles.background },
|
SignColumn = { fg = p.text, bg = styles.background },
|
||||||
StatusLine = { fg = p.subtle, bg = p.surface },
|
StatusLine = { fg = p.subtle, bg = styles.float_background },
|
||||||
StatusLineNC = { fg = p.muted, bg = p.base },
|
StatusLineNC = { fg = p.muted, bg = styles.background },
|
||||||
StatusLineTerm = { link = 'StatusLine' },
|
StatusLineTerm = { link = 'StatusLine' },
|
||||||
StatusLineTermNC = { link = 'StatusLineNC' },
|
StatusLineTermNC = { link = 'StatusLineNC' },
|
||||||
TabLine = { fg = p.subtle, bg = p.surface },
|
TabLine = { fg = p.subtle, bg = styles.float_background },
|
||||||
TabLineFill = { bg = p.surface },
|
TabLineFill = { bg = styles.float_background },
|
||||||
TabLineSel = { fg = p.text, bg = p.overlay },
|
TabLineSel = { fg = p.text, bg = p.overlay },
|
||||||
Title = { fg = p.text },
|
Title = { fg = p.text },
|
||||||
VertSplit = { fg = p.overlay, bg = styles.vert_split },
|
VertSplit = { fg = groups.border, bg = styles.vert_split },
|
||||||
Visual = { bg = p.highlight_med },
|
Visual = { bg = p.highlight_med },
|
||||||
-- VisualNOS = {},
|
-- VisualNOS = {},
|
||||||
WarningMsg = { fg = p.gold },
|
WarningMsg = { fg = p.gold },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue