Refine packer update commands
This commit is contained in:
parent
e35ccc8ae2
commit
6351093de0
2 changed files with 14 additions and 11 deletions
|
@ -3,14 +3,14 @@ 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
|
||||
|
@ -122,14 +122,15 @@ local use = require('packer').use
|
|||
-- Vim <3 Asciidoctor
|
||||
use 'habamax/vim-asciidoctor'
|
||||
|
||||
end)
|
||||
|
||||
-- Sync plugins if Packer was just
|
||||
-- installed
|
||||
if Packer_bootstrap then
|
||||
print('syncing')
|
||||
print('Syncing plugins')
|
||||
require('packer').sync()
|
||||
print('synced')
|
||||
print('Synced')
|
||||
end
|
||||
end)
|
||||
|
||||
-- Source configurations
|
||||
require 'plugins/lualine'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue