Skip to content

Commit 64640a8

Browse files
A-Lamiamehalter
authored andcommitted
feat(utils): add opts to be accessed from hl group callbacks
1 parent adaeaa2 commit 64640a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/astrotheme/lib/util.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ function M.get_plugin_list(opts)
3131
end
3232

3333
function M.get_hl_modules(highlights, path, modules)
34+
local opts = require("astrotheme").config.style
3435
for _, module in ipairs(modules) do
3536
local file_avail, file = pcall(require, path .. "." .. module)
36-
if type(file) == "function" then file = file() end
37+
if type(file) == "function" then file = file(opts) end
3738
if file_avail then highlights = vim.tbl_deep_extend("force", file, highlights) end
3839
end
3940
return highlights

0 commit comments

Comments
 (0)