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,14 +41,7 @@ local M = {}
|
||||||
---@field h6 string
|
---@field h6 string
|
||||||
|
|
||||||
---@type RosePineConfig
|
---@type RosePineConfig
|
||||||
local config = {}
|
local config = {
|
||||||
|
|
||||||
---@param opts RosePineConfig
|
|
||||||
function M.setup(opts)
|
|
||||||
opts = opts or {}
|
|
||||||
vim.g.rose_pine_variant = opts.variant or 'main'
|
|
||||||
|
|
||||||
local default_config = {
|
|
||||||
variant = 'main',
|
variant = 'main',
|
||||||
bold_vert_split = false,
|
bold_vert_split = false,
|
||||||
dim_nc_background = false,
|
dim_nc_background = false,
|
||||||
|
|
@ -88,6 +81,11 @@ function M.setup(opts)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
---@param opts RosePineConfig
|
||||||
|
function M.setup(opts)
|
||||||
|
opts = opts or {}
|
||||||
|
vim.g.rose_pine_variant = opts.variant or 'main'
|
||||||
|
|
||||||
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