mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
feat: allow overriding unset highlight groups
This commit is contained in:
parent
22b0dea68d
commit
3f0a6c06da
1 changed files with 9 additions and 3 deletions
|
|
@ -73,13 +73,19 @@ function M.colorscheme()
|
||||||
vim.g.colors_name = 'rose-pine'
|
vim.g.colors_name = 'rose-pine'
|
||||||
|
|
||||||
local theme = require('rose-pine.theme').get(config)
|
local theme = require('rose-pine.theme').get(config)
|
||||||
|
|
||||||
|
-- Set theme highlights
|
||||||
for group, color in pairs(theme) do
|
for group, color in pairs(theme) do
|
||||||
if config.highlight_groups[group] ~= nil then
|
-- Skip highlight group if user overrides
|
||||||
util.highlight(group, config.highlight_groups[group])
|
if config.highlight_groups[group] == nil then
|
||||||
else
|
|
||||||
util.highlight(group, color)
|
util.highlight(group, color)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set user highlights
|
||||||
|
for group, color in pairs(config.highlight_groups) do
|
||||||
|
util.highlight(group, color)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue