Merge pull request #166 from Akianonymus/main

Fixes
This commit is contained in:
siduck76 2021-07-19 21:32:50 +05:30 committed by GitHub
commit 665fa24783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -153,7 +153,9 @@ main() {
if _NVIM="$(command -v nvim)"; then if _NVIM="$(command -v nvim)"; then
if _check_nvim_version; then if _check_nvim_version; then
printf "\n%s\n" "=> Neovim will now open." && sleep 1 printf "\n%s\n" "=> Neovim will now open." && sleep 1
"${_NVIM}" +":lua require 'pluginList' vim.cmd('PackerSync')" "${_NVIM}" +"autocmd User PackerComplete ++once quitall" \
+":lua require 'pluginList' vim.cmd('PackerSync')"
"${_NVIM}"
else else
printf "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run nvim & do :PackerSync\n." printf "Error: Neovim is installed, but version is lower than 0.5.x, install Neovim >= 5.x and then run nvim & do :PackerSync\n."
fi fi

View File

@ -77,7 +77,7 @@ if
then then
-- This should only trigger when in need of PackerSync, so better do it -- This should only trigger when in need of PackerSync, so better do it
print("After completion of PackerSync, restart neovim.") print("After completion of PackerSync, restart neovim.")
-- Trigger packer compile on PackerComplete, so it properly waits for PackerSync
vim.cmd 'autocmd User PackerComplete ++once lua require("packer").compile()'
require("packer").sync("telescope-fzf-native.nvim", "telescope-media-files.nvim") require("packer").sync("telescope-fzf-native.nvim", "telescope-media-files.nvim")
-- why compile too ? well, packer is supposed to compile with sync only, but sometimes it doesn't work
vim.cmd("PackerCompile")
end end