fix(config): compat with lazy.nvim

This commit is contained in:
Folke Lemaitre 2023-03-17 22:29:01 +01:00
parent b984c0cff5
commit 501474e421
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -132,10 +132,11 @@ function M.load(name)
end, {
msg = "Failed loading " .. mod,
on_error = function(msg)
local modpath = require("lazy.core.cache").find(mod)
if modpath then
Util.error(msg)
local info = require("lazy.core.cache").find(mod)
if info == nil or (type(info) == "table" and #info == 0) then
return
end
Util.error(msg)
end,
})
end