feat(spec): added support for importing multiple spec modules with import = "foobar"

This commit is contained in:
Folke Lemaitre 2023-01-01 21:07:05 +01:00
parent 3974a6cbe3
commit 39b66027a5
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 57 additions and 40 deletions

View file

@ -17,7 +17,7 @@ function M.enable()
if M.timer then
M.timer:stop()
end
if type(Config.spec) == "string" then
if #Config.parsed.modules > 0 then
M.timer = vim.loop.new_timer()
M.root = vim.fn.stdpath("config") .. "/lua"
M.check(true)
@ -55,7 +55,9 @@ function M.check(start)
end
end
Util.lsmod(Config.spec --[[@as string]], check)
for _, modname in ipairs(Config.parsed.modules) do
Util.lsmod(modname, check)
end
for file in pairs(M.files) do
if not checked[file] then