blob: 4db151cc86ad8cb6da9caa0432f3a1c6dfd1c658 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
local M = {}
local function highlight(group, properties)
local bg = properties.bg == nil and "" or "guibg=" .. properties.bg
local fg = properties.fg == nil and "" or "guifg=" .. properties.fg
local sp = properties.sp == nil and "" or "guisp=" .. properties.sp
local style = properties.style == nil and "" or "gui=" .. properties.style
local cmd = table.concat({
"highlight",
group,
bg,
fg,
sp,
style,
}, " ")
vim.api.nvim_command(cmd)
end
function M.initialise(skeleton)
for group, properties in pairs(skeleton) do
highlight(group, properties)
end
end
return M
|