mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +02:00
25 lines
535 B
Lua
25 lines
535 B
Lua
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 style = properties.style == nil and "" or "gui=" .. properties.style
|
|
|
|
local cmd = table.concat({
|
|
"highlight",
|
|
group,
|
|
bg,
|
|
fg,
|
|
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
|