Skip to content

Commit 8a0da3b

Browse files
committed
config: move lazy cache to state/nvim/lazy/cache
1 parent 7eb6034 commit 8a0da3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/lazy/core/cache.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ M.VERSION = "1"
99
---@class LazyCacheConfig
1010
M.config = {
1111
enabled = true,
12-
path = vim.fn.stdpath("state") .. "/lazy.state",
12+
path = vim.fn.stdpath("state") .. "/lazy/cache",
1313
-- Once one of the following events triggers, caching will be disabled.
1414
-- To cache all modules, set this to `{}`, but that is not recommended.
1515
-- The default is to disable on:
@@ -219,6 +219,7 @@ function M.eq(h1, h2)
219219
end
220220

221221
function M.save_cache()
222+
vim.fn.mkdir(vim.fn.fnamemodify(M.config.path, ":p:h"), "p")
222223
local f = assert(uv.fs_open(M.config.path, "w", 438))
223224
uv.fs_write(f, M.VERSION)
224225
uv.fs_write(f, "\0")

0 commit comments

Comments
 (0)