summaryrefslogtreecommitdiff
path: root/lua/bootstrap.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2021-09-16 09:58:32 +0200
committerGitHub <[email protected]>2021-09-16 12:28:32 +0430
commite22f9a21c179901e6dfcbdb68d035e70eae4d9e8 (patch)
tree95fc4bbb019089cc62de91d4c722067ea313e10b /lua/bootstrap.lua
parent168eb232d12f86e98f0d90c4e73e0c9968a3cb8e (diff)
fix: more robust reloading (#1556)
Diffstat (limited to 'lua/bootstrap.lua')
-rw-r--r--lua/bootstrap.lua11
1 files changed, 5 insertions, 6 deletions
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