diff --git a/zsh/bin/update b/zsh/bin/update index 38113a7..46345a4 100755 --- a/zsh/bin/update +++ b/zsh/bin/update @@ -236,6 +236,22 @@ update-dotfiles() { echo "\033[32;1m=== Dotfiles updated in $formatted ===\033[0m" } +update-neovim() { + command -v nvim > /dev/null 2&>1 + if [ $? -ne 0 ]; then + return + fi + + start_neovim_update=`date +%s` + echo "\033[32;1m=== Updating neovim packages ===\033[0m" + + nvim +PlugUpdate +qall + + seconds=$((`date +%s` - $start_neovim_update )) + formatted=`date -ud "@$seconds" +'%H hours %M minutes %S seconds'` + echo "\033[32;1m=== Neovim updated in $formatted ===\033[0m" +} + main() { if [ $# -eq 0 ]; then @@ -255,6 +271,9 @@ main() { # Update the dotfiles update-dotfiles + # Update the neovim packages + update-neovim + format=`_date_format` if [ $? -eq 0 ]; then @@ -274,6 +293,7 @@ main() { "rust") update-rust;; "npm") update-npm;; "dotfiles") update-dotfiles;; + "neovim") update-neovim;; "check") _check_date_if_format;; esac