From e22f9a21c179901e6dfcbdb68d035e70eae4d9e8 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 16 Sep 2021 09:58:32 +0200 Subject: fix: more robust reloading (#1556) --- lua/bootstrap.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lua/bootstrap.lua') diff --git a/lua/bootstrap.lua b/lua/bootstrap.lua index 695dacdc..85d39d2d 100644 --- a/lua/bootstrap.lua +++ b/lua/bootstrap.lua @@ -38,6 +38,8 @@ function M:init() self.cache_path = get_cache_dir() self.pack_dir = join_paths(self.runtime_dir, "site", "pack") + self.packer_install_dir = join_paths(self.runtime_dir, "site", "pack", "packer", "start", "packer.nvim") + self.packer_cache_path = join_paths(self.config_dir, "plugin", "packer_compiled.lua") if os.getenv "LUNARVIM_RUNTIME_DIR" then vim.opt.rtp:remove(join_paths(vim.fn.stdpath "data", "site")) @@ -57,6 +59,7 @@ function M:init() -- FIXME: currently unreliable in unit-tests if not os.getenv "LVIM_TEST_ENV" then + vim.fn.mkdir(vim.fn.stdpath "cache", "p") require("impatient").setup { path = vim.fn.stdpath "cache" .. "/lvim_cache", enable_profiling = true, @@ -69,12 +72,8 @@ function M:init() } require("plugin-loader"):init { - cache_path = self.cache_path, - runtime_dir = self.runtime_dir, - config_dir = self.config_dir, - install_path = join_paths(self.runtime_dir, "site", "pack", "packer", "start", "packer.nvim"), - package_root = join_paths(self.runtime_dir, "site", "pack"), - compile_path = join_paths(self.config_dir, "plugin", "packer_compiled.lua"), + package_root = self.pack_dir, + install_path = self.packer_install_dir, } return self -- cgit v1.2.3