feat(syntax)!: add additional syntax styles.

Introduce new styles options in order to be able to customize a
bit more the rose pine colorscheme syntax and not depend exclusively on
italic and bold style options. A new utility function was added in order
to add a custom hl property style for custom syntax styles.
This commit is contained in:
Johan Restrepo 2024-03-16 14:22:28 -05:00
commit 4db28ae644
3 changed files with 23 additions and 9 deletions

View file

@ -44,4 +44,14 @@ function utilities.blend(fg, bg, alpha)
return string.format("#%02X%02X%02X", blend_channel(1), blend_channel(2), blend_channel(3))
end
---@param group string
---@param hl table<string, boolean>
function utilities.highlight(group, hl)
if hl.style then
hl = vim.tbl_extend("force", hl, hl.style)
hl.style = nil
end
vim.api.nvim_set_hl(0, group, hl)
end
return utilities