Files

24 lines
588 B
Lua

local utils = require("astrobox.utils")
local M = {}
--- @param theme Theme
--- @param palette Palette
--- @param config Config
function M.make_highlights(theme, palette, config)
local HL = {}
local function load_mod(mod, mod_name)
local ok, res = pcall(mod, theme, palette, config)
if ok and res then
HL = vim.tbl_extend("error", HL, res)
else
vim.notify("Failed to load module " .. mod_name .. " (" .. res .. ")")
end
end
utils.visit_astrobox_modules("highlights.modules", load_mod)
return HL
end
return M