feat(cache): allow to disable the cache

This commit is contained in:
Folke Lemaitre 2023-02-13 11:58:09 +01:00
parent 609445a051
commit 856ab9e476
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -34,7 +34,9 @@ function M.setup(spec, opts)
local start = vim.loop.hrtime()
-- load module cache before anything else
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")