mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 15:19:26 +02:00
fix(install): avoid data-races for on_packer_complete
(#2157)
This commit is contained in:
parent
66e8facb15
commit
ec1e4140fa
3 changed files with 13 additions and 19 deletions
|
@ -43,7 +43,9 @@ function plugin_loader.init(opts)
|
|||
},
|
||||
}
|
||||
|
||||
vim.cmd [[autocmd User PackerComplete lua require('lvim.utils.hooks').run_on_packer_complete()]]
|
||||
if not in_headless then
|
||||
vim.cmd [[autocmd User PackerComplete lua require('lvim.utils.hooks').run_on_packer_complete()]]
|
||||
end
|
||||
end
|
||||
|
||||
-- packer expects a space separated list
|
||||
|
@ -113,7 +115,6 @@ function plugin_loader.sync_core_plugins()
|
|||
end
|
||||
|
||||
function plugin_loader.ensure_installed()
|
||||
plugin_loader.cache_clear()
|
||||
local all_plugins = _G.packer_plugins or plugin_loader.get_core_plugins()
|
||||
Log:trace(string.format("Syncing core plugins: [%q]", table.concat(all_plugins, ", ")))
|
||||
pcall_packer_command("install", all_plugins)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue