From 4abbee99cc88ff8adb7e09e26b5f787c5c4c25c1 Mon Sep 17 00:00:00 2001 From: edi <74437706+vzze@users.noreply.github.com> Date: Fri, 27 Jan 2023 23:41:48 +0200 Subject: [PATCH] fix upgrade order of (n)vim plugins (#322) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix upgrade order of (n)vim plugins * treesitter should use the synchronous cmd --------- Co-authored-by: Thomas Schönauer <37108907+DottoDev@users.noreply.github.com> --- src/steps/upgrade.vim | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/steps/upgrade.vim b/src/steps/upgrade.vim index 5eac813e..a901f2f5 100644 --- a/src/steps/upgrade.vim +++ b/src/steps/upgrade.vim @@ -33,23 +33,24 @@ if exists(":PaqUpdate") PaqUpdate endif -if exists(":CocUpdateSync") - echo "CocUpdateSync" - CocUpdateSync -endif +function! UpdateCoCAndTS() + if exists(":CocUpdateSync") + echo "CocUpdateSync" + CocUpdateSync + endif -" TODO: Should this be after `PackerSync`? -" Not sure how to sequence this after Packer without doing something weird -" with that `PackerComplete` autocommand. -if exists(":TSUpdate") - echo "TreeSitter Update" - TSUpdate -endif + if exists(":TSUpdateSync") + echo "TreeSitter Update" + TSUpdate + endif + + quitall +endfunction if exists(':PackerSync') - echo "Packer" - autocmd User PackerComplete quitall - PackerSync + echo "Packer" + autocmd User PackerComplete * call UpdateCoCAndTS() + PackerSync else - quitall + call UpdateCoCAndTS() endif