diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index be06062..bc8257b 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -113,8 +113,9 @@ M.defaults = { notify = true, -- get a notification when changes are found }, performance = { - ---@type LazyCacheConfig - cache = nil, + cache = { + enabled = true, + }, reset_packpath = true, -- reset the package path to improve startup time rtp = { reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory diff --git a/lua/lazy/init.lua b/lua/lazy/init.lua index df05824..e81c4ec 100644 --- a/lua/lazy/init.lua +++ b/lua/lazy/init.lua @@ -34,7 +34,9 @@ function M.setup(spec, opts) local start = vim.loop.hrtime() -- load module cache before anything else - require("lazy.core.cache").enable() + if not (opts and opts.performance and opts.performance.cache and opts.performance.cache.enabled == false) then + require("lazy.core.cache").enable() + end require("lazy.stats").track("LazyStart")