From 9e90852a471205e92e524e9052cc2df101a24d80 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 2 Jan 2023 14:50:34 +0100 Subject: [PATCH] fix(cache): autoloading was broken! --- lua/lazy/core/cache.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/core/cache.lua b/lua/lazy/core/cache.lua index c967142..10c3848 100644 --- a/lua/lazy/core/cache.lua +++ b/lua/lazy/core/cache.lua @@ -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")