38 lines
1.4 KiB
Bash
38 lines
1.4 KiB
Bash
#!/bin/bash
|
|
echo "🤔 Checking for Neovim installation..."
|
|
if nvim -v; then
|
|
echo "🥰 Neovim is already installed"
|
|
else
|
|
echo "🤩 Installing Neovim"
|
|
sudo apt-get install software-properties-common
|
|
sudo apt-get install python-software-properties
|
|
sudo add-apt-repository ppa:neovim-ppa/stable
|
|
sudo apt-get update
|
|
sudo apt-get install neovim
|
|
sudo apt-get install python-dev python-pip python3-dev python3-pip
|
|
echo "👍 Neovim installed"
|
|
fi
|
|
|
|
echo "🦄 Setting Neovim as default editor"
|
|
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
|
|
sudo update-alternatives --config vi
|
|
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
|
|
sudo update-alternatives --config vim
|
|
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
|
|
sudo update-alternatives --config editor
|
|
echo "👍 Neovim set as default editor"
|
|
|
|
echo "🦄 Symlinking Neovim configuration"
|
|
rm ~/.config/nvim/init.vim
|
|
ln -s ~/dotfiles/nvim/init.vim ~/.config/nvim/init.vim
|
|
echo "👍 Symlinked Neovim configuration"
|
|
|
|
echo "🤔 Checking for vim-plug"
|
|
if [ -f ~/.local/share/nvim/site/autoload/plug.vim ]; then
|
|
echo "🥰 vim-plug is already installed"
|
|
else
|
|
echo "🤩 Installing vim-plug"
|
|
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
echo "👍 vim-plug installed"
|
|
fi
|