mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 19:50:14 +02:00
refactor(cache): revert all vim.cache
changes and disable it if it would ever exist
This commit is contained in:
parent
942c805b84
commit
21a219a825
6 changed files with 14 additions and 25 deletions
|
@ -33,11 +33,13 @@ function M.setup(spec, opts)
|
|||
end
|
||||
local start = vim.loop.hrtime()
|
||||
|
||||
-- poly-fill vim.cache
|
||||
if not vim.cache then
|
||||
vim.cache = require("lazy.core.cache")
|
||||
-- disable the Neovim cache if it would ever be added
|
||||
if vim.cache and vim.cache.disable then
|
||||
vim.cache.disable()
|
||||
end
|
||||
|
||||
local Cache = require("lazy.core.cache")
|
||||
|
||||
local enable_cache = not (
|
||||
opts
|
||||
and opts.performance
|
||||
|
@ -46,7 +48,7 @@ function M.setup(spec, opts)
|
|||
)
|
||||
-- load module cache before anything else
|
||||
if enable_cache then
|
||||
vim.cache.enable()
|
||||
Cache.enable()
|
||||
end
|
||||
|
||||
require("lazy.stats").track("LazyStart")
|
||||
|
@ -58,7 +60,7 @@ function M.setup(spec, opts)
|
|||
table.insert(package.loaders, 3, Loader.loader)
|
||||
|
||||
if vim.g.profile_loaders then
|
||||
vim.cache.profile_loaders()
|
||||
Cache.profile_loaders()
|
||||
end
|
||||
|
||||
Util.track({ plugin = "lazy.nvim" }) -- setup start
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue