From 8a0da3b27ee1d2263acce8f82dae1b7c71befa37 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 19 Dec 2022 13:55:00 +0100 Subject: [PATCH] config: move lazy cache to state/nvim/lazy/cache --- lua/lazy/core/cache.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/cache.lua b/lua/lazy/core/cache.lua index 189b400..0f11c57 100644 --- a/lua/lazy/core/cache.lua +++ b/lua/lazy/core/cache.lua @@ -9,7 +9,7 @@ M.VERSION = "1" ---@class LazyCacheConfig M.config = { enabled = true, - path = vim.fn.stdpath("state") .. "/lazy.state", + path = vim.fn.stdpath("state") .. "/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: @@ -219,6 +219,7 @@ function M.eq(h1, h2) end function M.save_cache() + vim.fn.mkdir(vim.fn.fnamemodify(M.config.path, ":p:h"), "p") local f = assert(uv.fs_open(M.config.path, "w", 438)) uv.fs_write(f, M.VERSION) uv.fs_write(f, "\0")