2020-02-14 15:18:48 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-02-19 11:32:46 +00:00
|
|
|
function mkdir_if_not_exist() {
|
|
|
|
if [ ! -d "$1" ]; then
|
|
|
|
echo "Creating $1"
|
|
|
|
mkdir -p "$1"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
mkdir_if_not_exist ~/.config/nvim
|
|
|
|
mkdir_if_not_exist ~/.config/fish
|
|
|
|
mkdir_if_not_exist ~/.config/omf
|
|
|
|
mkdir_if_not_exist ~/.terminfo
|
|
|
|
|
2020-02-14 15:25:22 +00:00
|
|
|
# Create nvim config directory if it doesn't exist
|
|
|
|
|
2020-02-14 15:18:48 +00:00
|
|
|
for d in $(ls -d */ | cut -f1 -d '/'); do
|
2020-02-14 15:50:24 +00:00
|
|
|
echo "Linking $d..."
|
2020-02-14 15:18:48 +00:00
|
|
|
(stow $d)
|
|
|
|
done
|
|
|
|
|
2020-02-19 11:32:46 +00:00
|
|
|
if [ -f /usr/bin/zsh ]; then
|
|
|
|
# Install zplug if it doesn't exist yet
|
|
|
|
if [ ! -d ~/.zplug ]; then
|
|
|
|
echo "Installing zplug"
|
|
|
|
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
|
|
|
|
fi
|
2020-02-14 15:18:48 +00:00
|
|
|
fi
|
2020-02-14 15:25:22 +00:00
|
|
|
|
2020-02-14 15:30:16 +00:00
|
|
|
# Install vim plugins & requirements
|
|
|
|
if [ ! "$(pip list --user | grep 'pynvim' | wc -l)" -ge 1 ]; then
|
|
|
|
pip install --user pynvim
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Install plug package manager if it doesn't exist
|
|
|
|
if [ ! -d ~/.config/nvim/plugged ]; then
|
|
|
|
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
|
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
fi
|
2020-02-14 15:25:22 +00:00
|
|
|
# Install nvim pluugins
|
|
|
|
nvim +PlugInstall +qall
|
2020-02-19 11:32:46 +00:00
|
|
|
|
|
|
|
if [ -f /usr/bin/fish ]; then
|
|
|
|
./install.fish
|
|
|
|
fi
|