Merge branch 'feature/highlight-blend' into master

This commit is contained in:
Iron_E 2020-08-28 14:14:59 -04:00
commit 9550d1db19
No known key found for this signature in database
GPG Key ID: B0B37DE7EDC2335F
2 changed files with 6 additions and 1 deletions

View File

@ -116,6 +116,7 @@ local purple_light = {'#af60af', 63, 'magenta'}
<highlight group name> = {
bg=<color>, -- The color used for background color, or use 'NONE', 'fg' or 'bg'
fg=<color>, -- The color used for foreground color, or use 'NONE', 'fg' or 'bg'
blend=<integer> -- The |highlight-blend| value, if one is desired.
-- Style can be 'bold', 'italic', and more. See |attr-list| for more information. It can also have a color, and/or multiple <cterm>s.
style=<cterm>|{<cterm> [, <cterm>] [color=<color>]})
}

View File

@ -66,9 +66,13 @@ local function highlight(highlight_group, attributes) -- {{{ †
highlight_cmd[3] = highlight_cmd[2]..' '
highlight_cmd[2] = 'link '
highlight_cmd[4] = link
else -- the `highlight_group` is uniquely defined.
else -- The `highlight_group` is uniquely defined.
colorize(highlight_cmd, attributes)
if attributes.blend then -- There is a value for the `highlight-blend` field.
highlight_cmd[#highlight_cmd + 1] = ' blend='..attributes.blend
end
local style = attributes.style
if type(style) == 'table' then
-- Concat all of the entries together with a comma between before styling.