Now standalone plugin
First impl of standalone colorscheme
This commit is contained in:
18
lua/astrobox/highlights/init.lua
Normal file
18
lua/astrobox/highlights/init.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
local utils = require("astrobox.utils")
|
||||
|
||||
return function(palette, config)
|
||||
local HL = {}
|
||||
local function load_mod(mod, mod_name)
|
||||
local ok, res = pcall(mod, 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)
|
||||
|
||||
HL = vim.tbl_extend("force", HL, config.overrides)
|
||||
|
||||
return HL
|
||||
end
|
||||
Reference in New Issue
Block a user