From 6351093de0a9bae6d78ca1ed2906121a3e82a14f Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Tue, 23 Aug 2022 09:28:07 +0300 Subject: [PATCH] Refine packer update commands --- home/.config/nvim/lua/plugins/init.lua | 21 +++++++++++---------- home/.config/zsh/03-aliases.zsh | 4 +++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/home/.config/nvim/lua/plugins/init.lua b/home/.config/nvim/lua/plugins/init.lua index d01452e..cdda323 100644 --- a/home/.config/nvim/lua/plugins/init.lua +++ b/home/.config/nvim/lua/plugins/init.lua @@ -3,20 +3,20 @@ local fn = vim.fn -- Install packer if it's not yet installed local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then - print('installing packer') + print('Installing Packer') Packer_bootstrap = fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }) vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. vim.o.runtimepath - print('installed packer') + print('Installed Packer') end -- Configure packer vim.cmd [[packadd packer.nvim]] require('packer').startup(function() -local use = require('packer').use + local use = require('packer').use -- The plugin manager itself use {'wbthomason/packer.nvim', opt=true} @@ -122,15 +122,16 @@ local use = require('packer').use -- Vim <3 Asciidoctor use 'habamax/vim-asciidoctor' - -- Sync plugins if Packer was just - -- installed - if Packer_bootstrap then - print('syncing') - require('packer').sync() - print('synced') - end end) +-- Sync plugins if Packer was just +-- installed +if Packer_bootstrap then + print('Syncing plugins') + require('packer').sync() + print('Synced') +end + -- Source configurations require 'plugins/lualine' require 'plugins/bufferline' diff --git a/home/.config/zsh/03-aliases.zsh b/home/.config/zsh/03-aliases.zsh index bddf1c6..1e14d29 100644 --- a/home/.config/zsh/03-aliases.zsh +++ b/home/.config/zsh/03-aliases.zsh @@ -132,7 +132,9 @@ update() { } plugins() { - nvim -c 'autocmd User PackerComplete quitall' -c 'PackerSync' + echo "Updating NeoVim plugins" + nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync' + echo "Updating NeoVim TreeSitter" nvim --headless +TSUpdateSync +qa zinit self-update zinit update -p