etc/nvim/lua/color/init.lua

23 lines
420 B
Lua
Raw Permalink Normal View History

2023-08-29 17:39:24 +03:00
-- Main package for highlighting
local c = require("color.cons").colors
local package = {}
function package.apply_hls(hls)
hls = hls or {}
for k, hl in pairs(hls) do
2023-09-01 14:13:12 +03:00
hl.ctermfg = hl.ctermfg or hl.fg or nil
hl.ctermbg = hl.ctermbg or hl.bg or nil
hl.cterm = {
bold = hl.bold or nil,
underline = hl.underline or nil,
}
2023-08-29 17:39:24 +03:00
vim.api.nvim_set_hl(
0,
k,
hl
)
end
end
return package