mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-27 19:24:13 +00:00
perf: new file-based cache that ensures correct rtp order (#532)
* perf: new file-based cache that ensures rtp is alweays correct and will cache all files, including those after startup * refactor: new cache * test: fix tests * fix(cache): cache file names on Windows * feat(cache): allow to disable the cache * docs: updated cache settings
This commit is contained in:
parent
06f835d0b4
commit
462633bae1
10 changed files with 354 additions and 549 deletions
|
@ -131,12 +131,7 @@ function M.colors()
|
|||
end
|
||||
|
||||
function M.update()
|
||||
local cache_config = M.extract("lua/lazy/core/cache.lua", "\nM%.config = ({.-\n})")
|
||||
local config = M.extract("lua/lazy/core/config.lua", "\nM%.defaults = ({.-\n})")
|
||||
config = config:gsub(
|
||||
"\n%s*%-%-%-@type LazyCacheConfig.*cache = nil,",
|
||||
"\n" .. M.indent("cache = " .. cache_config .. ",", 4)
|
||||
)
|
||||
config = config:gsub("%s*debug = false.\n", "\n")
|
||||
M.save({
|
||||
bootstrap = M.extract("lua/lazy/init.lua", "function M%.bootstrap%(%)\n(.-)\nend"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue