fix packer compile spam on startup (#325)

This commit is contained in:
siduck76 2021-08-30 11:48:52 +05:30
parent ad35d6b6e2
commit 56ea1714f6

View File

@ -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)