mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-25 19:55:36 +02:00
fix: more robust reloading (#1556)
This commit is contained in:
parent
168eb232d1
commit
e22f9a21c1
7 changed files with 93 additions and 36 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue