mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2024-12-13 05:20:38 +00:00
fix packer compile spam on startup (#325)
This commit is contained in:
parent
ad35d6b6e2
commit
56ea1714f6
1 changed files with 2 additions and 10 deletions
|
@ -73,16 +73,8 @@ if vim.fn.executable "ueberzug" == 1 then
|
|||
packer_repos = packer_repos .. ', "telescope-media-files.nvim"'
|
||||
end
|
||||
|
||||
if not pcall(function()
|
||||
pcall(function()
|
||||
for _, ext in ipairs(extensions) do
|
||||
telescope.load_extension(ext)
|
||||
end
|
||||
end) then
|
||||
-- This should only trigger when in need of PackerSync, so better do it
|
||||
print "After completion of PackerCompile, restart neovim."
|
||||
-- Trigger packer compile on PackerComplete, so it properly waits for PackerSync
|
||||
vim.cmd 'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." require("packer").compile()'
|
||||
vim.cmd 'autocmd User PackerCompileDone ++once echo "Packer Compile done, restart neovim."'
|
||||
require "plugins"
|
||||
loadstring('require("packer").update(' .. packer_repos .. ")")()
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue