mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
parent
8fe21c53da
commit
9f4356a0da
1 changed files with 40 additions and 42 deletions
|
|
@ -41,53 +41,51 @@ local M = {}
|
||||||
---@field h6 string
|
---@field h6 string
|
||||||
|
|
||||||
---@type RosePineConfig
|
---@type RosePineConfig
|
||||||
local config = {}
|
local config = {
|
||||||
|
variant = 'main',
|
||||||
|
bold_vert_split = false,
|
||||||
|
dim_nc_background = false,
|
||||||
|
disable_background = false,
|
||||||
|
disable_float_background = false,
|
||||||
|
disable_italics = false,
|
||||||
|
|
||||||
|
groups = {
|
||||||
|
border = 'highlight_med',
|
||||||
|
comment = 'muted',
|
||||||
|
link = 'iris',
|
||||||
|
punctuation = 'subtle',
|
||||||
|
|
||||||
|
error = 'love',
|
||||||
|
hint = 'iris',
|
||||||
|
info = 'foam',
|
||||||
|
warn = 'gold',
|
||||||
|
|
||||||
|
git_add = 'foam',
|
||||||
|
git_change = 'rose',
|
||||||
|
git_delete = 'love',
|
||||||
|
git_dirty = 'rose',
|
||||||
|
git_ignore = 'muted',
|
||||||
|
git_merge = 'iris',
|
||||||
|
git_rename = 'pine',
|
||||||
|
git_stage = 'iris',
|
||||||
|
git_text = 'rose',
|
||||||
|
|
||||||
|
headings = {
|
||||||
|
h1 = 'iris',
|
||||||
|
h2 = 'foam',
|
||||||
|
h3 = 'rose',
|
||||||
|
h4 = 'gold',
|
||||||
|
h5 = 'pine',
|
||||||
|
h6 = 'foam',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
---@param opts RosePineConfig
|
---@param opts RosePineConfig
|
||||||
function M.setup(opts)
|
function M.setup(opts)
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
vim.g.rose_pine_variant = opts.variant or 'main'
|
vim.g.rose_pine_variant = opts.variant or 'main'
|
||||||
|
|
||||||
local default_config = {
|
|
||||||
variant = 'main',
|
|
||||||
bold_vert_split = false,
|
|
||||||
dim_nc_background = false,
|
|
||||||
disable_background = false,
|
|
||||||
disable_float_background = false,
|
|
||||||
disable_italics = false,
|
|
||||||
|
|
||||||
groups = {
|
|
||||||
border = 'highlight_med',
|
|
||||||
comment = 'muted',
|
|
||||||
link = 'iris',
|
|
||||||
punctuation = 'subtle',
|
|
||||||
|
|
||||||
error = 'love',
|
|
||||||
hint = 'iris',
|
|
||||||
info = 'foam',
|
|
||||||
warn = 'gold',
|
|
||||||
|
|
||||||
git_add = 'foam',
|
|
||||||
git_change = 'rose',
|
|
||||||
git_delete = 'love',
|
|
||||||
git_dirty = 'rose',
|
|
||||||
git_ignore = 'muted',
|
|
||||||
git_merge = 'iris',
|
|
||||||
git_rename = 'pine',
|
|
||||||
git_stage = 'iris',
|
|
||||||
git_text = 'rose',
|
|
||||||
|
|
||||||
headings = {
|
|
||||||
h1 = 'iris',
|
|
||||||
h2 = 'foam',
|
|
||||||
h3 = 'rose',
|
|
||||||
h4 = 'gold',
|
|
||||||
h5 = 'pine',
|
|
||||||
h6 = 'foam',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
if opts.groups and type(opts.groups.headings) == 'string' then
|
if opts.groups and type(opts.groups.headings) == 'string' then
|
||||||
opts.groups.headings = {
|
opts.groups.headings = {
|
||||||
h1 = opts.groups.headings,
|
h1 = opts.groups.headings,
|
||||||
|
|
@ -100,7 +98,7 @@ function M.setup(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
config.user_variant = opts.variant or nil
|
config.user_variant = opts.variant or nil
|
||||||
config = vim.tbl_deep_extend('force', default_config, opts)
|
config = vim.tbl_deep_extend('force', config, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.colorscheme()
|
function M.colorscheme()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue