Initial implementation

This commit is contained in:
Iron_E 2020-08-28 13:26:37 -04:00
parent 8c81bd9f30
commit 82b0fd14bb
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> = { <highlight group name> = {
bg=<color>, -- The color used for background color, or use 'NONE', 'fg' or 'bg' 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' 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 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>]}) 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[3] = highlight_cmd[2]..' '
highlight_cmd[2] = 'link ' highlight_cmd[2] = 'link '
highlight_cmd[4] = link highlight_cmd[4] = link
else -- the `highlight_group` is uniquely defined. else -- The `highlight_group` is uniquely defined.
colorize(highlight_cmd, attributes) 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 local style = attributes.style
if type(style) == 'table' then if type(style) == 'table' then
-- Concat all of the entries together with a comma between before styling. -- Concat all of the entries together with a comma between before styling.