style(highlite): newline `{`

This commit is contained in:
Iron-E 2021-08-22 15:22:16 -04:00
parent 3d99355405
commit cac088df10
No known key found for this signature in database
GPG Key ID: 19B71B7B7B021D22
1 changed files with 4 additions and 2 deletions

View File

@ -114,7 +114,8 @@ function highlite.group(group_name)
style.color = tohex(group_definition.special) style.color = tohex(group_definition.special)
end end
return { return
{
['fg'] = group_definition.foreground and tohex(group_definition.foreground) or _NONE, ['fg'] = group_definition.foreground and tohex(group_definition.foreground) or _NONE,
['bg'] = group_definition.background and tohex(group_definition.background) or _NONE, ['bg'] = group_definition.background and tohex(group_definition.background) or _NONE,
['blend'] = group_definition.blend, ['blend'] = group_definition.blend,
@ -171,7 +172,8 @@ return setmetatable(highlite, {['__call'] = function(self, normal, highlights, t
local value = tbl[key] local value = tbl[key]
local value_type = type(value) local value_type = type(value)
if value_type == 'function' then -- call and cache the result; next time, if it isn't a function this step will be skipped if value_type == 'function' then -- call and cache the result; next time, if it isn't a function this step will be skipped
tbl[key] = value(setmetatable({}, { tbl[key] = value(setmetatable({},
{
['__index'] = function(_, inner_key) return resolve(tbl, inner_key, true) end ['__index'] = function(_, inner_key) return resolve(tbl, inner_key, true) end
})) }))
elseif resolve_links and value_type == _TYPE_STRING and not string.find(value, '^#') then elseif resolve_links and value_type == _TYPE_STRING and not string.find(value, '^#') then