Preparing configuration of neovim

This commit is contained in:
Thomas Forgione 2019-04-26 15:07:03 +02:00
parent c417983266
commit 3733717507
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 28 additions and 1 deletions

View File

@ -84,7 +84,7 @@ configure_zsh() {
yes_no_ask "do you wish to install and configure zsh ?"
if [ $? -ne 0 ]; then
info "exiting"
info "not installing zsh"
return
fi
@ -165,6 +165,32 @@ configure_zsh() {
fi
}
configure_neovim() {
test_command nvim
if [ $? -ne 0 ] && [ $sudo_available -ne 0 ]; then
warn "you don't have neither sudo nor neovim, skipping neovim configuration"
return
fi
yes_no_ask "do you wish to install and configure neovim ?"
if [ $? -ne 0 ]; then
info "not installing neovim"
return
fi
test_command nvim
if [ $? -ne 0 ]; then
info "installing neovim"
install neovim
fi
mkdir -p $HOME/.config/nvim $HOME/.nvim/backups $HOME/.nvim/swp $HOME/.nvim/undo
ln -s $HOME/.config/dotfiles/init.vim $HOME/.config/nvim/init.vim
nvim +qa
}
main() {
echo_green "=== WELCOME TO TFORGIONE'S CONFIG INSTALLER ==="
@ -173,6 +199,7 @@ main() {
sudo_available=$?
configure_zsh
configure_neovim
}
main < /dev/tty