fix(cache): autoloading was broken!

This commit is contained in:
Folke Lemaitre 2023-01-02 14:50:34 +01:00
parent 1ec8f08480
commit 9e90852a47
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ function M.check_autoload(modname, modpath)
-- we're not interested in loader time, so calculate delta here
M.stats.autoload.time = M.stats.autoload.time + uv.hrtime() - start
-- only autoload when plugins have been loaded
if #require("lazy.core.config").plugins > 0 then
if not vim.tbl_isempty(require("lazy.core.config").plugins) then
if not plugin._.loaded then
if plugin.module == false then
error("Plugin " .. plugin.name .. " is not loaded and is configured with module=false")