mirror of https://github.com/folke/lazy.nvim.git
docs: updated cache settings
This commit is contained in:
parent
856ab9e476
commit
8b672c41cb
10
README.md
10
README.md
|
@ -347,7 +347,7 @@ return {
|
||||||
init = " ",
|
init = " ",
|
||||||
import = " ",
|
import = " ",
|
||||||
keys = " ",
|
keys = " ",
|
||||||
lazy = "鈴 ",
|
lazy = " ",
|
||||||
loaded = "●",
|
loaded = "●",
|
||||||
not_loaded = "○",
|
not_loaded = "○",
|
||||||
plugin = " ",
|
plugin = " ",
|
||||||
|
@ -409,14 +409,6 @@ return {
|
||||||
performance = {
|
performance = {
|
||||||
cache = {
|
cache = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
path = vim.fn.stdpath("cache") .. "/lazy/cache",
|
|
||||||
-- Once one of the following events triggers, caching will be disabled.
|
|
||||||
-- To cache all modules, set this to `{}`, but that is not recommended.
|
|
||||||
-- The default is to disable on:
|
|
||||||
-- * VimEnter: not useful to cache anything else beyond startup
|
|
||||||
-- * BufReadPre: this will be triggered early when opening a file from the command line directly
|
|
||||||
disable_events = { "UIEnter", "BufReadPre" },
|
|
||||||
ttl = 3600 * 24 * 5, -- keep unused modules for up to 5 days
|
|
||||||
},
|
},
|
||||||
reset_packpath = true, -- reset the package path to improve startup time
|
reset_packpath = true, -- reset the package path to improve startup time
|
||||||
rtp = {
|
rtp = {
|
||||||
|
|
|
@ -131,12 +131,7 @@ function M.colors()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.update()
|
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})")
|
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")
|
config = config:gsub("%s*debug = false.\n", "\n")
|
||||||
M.save({
|
M.save({
|
||||||
bootstrap = M.extract("lua/lazy/init.lua", "function M%.bootstrap%(%)\n(.-)\nend"),
|
bootstrap = M.extract("lua/lazy/init.lua", "function M%.bootstrap%(%)\n(.-)\nend"),
|
||||||
|
|
Loading…
Reference in New Issue