mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
fix nil groups
This commit is contained in:
parent
b77bd8e7ce
commit
c7303fda41
2 changed files with 9 additions and 10 deletions
|
|
@ -91,15 +91,14 @@ function M.setup(opts)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local groups = opts.groups or {}
|
if opts.groups and type(opts.groups.headings) == 'string' then
|
||||||
if type(groups.headings) == 'string' then
|
opts.groups.headings = {
|
||||||
groups.headings = {
|
h1 = opts.groups.headings,
|
||||||
h1 = groups.headings,
|
h2 = opts.groups.headings,
|
||||||
h2 = groups.headings,
|
h3 = opts.groups.headings,
|
||||||
h3 = groups.headings,
|
h4 = opts.groups.headings,
|
||||||
h4 = groups.headings,
|
h5 = opts.groups.headings,
|
||||||
h5 = groups.headings,
|
h6 = opts.groups.headings,
|
||||||
h6 = groups.headings,
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ local M = {}
|
||||||
|
|
||||||
function M.get(config)
|
function M.get(config)
|
||||||
local theme = {}
|
local theme = {}
|
||||||
local groups = config.groups
|
local groups = config.groups or {}
|
||||||
local colors = palette[config.variant or 'main']
|
local colors = palette[config.variant or 'main']
|
||||||
local styles = {
|
local styles = {
|
||||||
italic = (config.disable_italics and 'italic') or 'NONE',
|
italic = (config.disable_italics and 'italic') or 'NONE',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue