2015-10-28 10:54:46 -07:00
|
|
|
#! /bin/bash
|
|
|
|
|
2012-07-02 15:26:56 -04:00
|
|
|
############################
|
|
|
|
# Vim Settings Setup script by ViViDboarder (Ian)
|
|
|
|
# http://github.com/ViViDboarder/Vim-Settings
|
|
|
|
############################
|
2012-03-28 23:18:33 -04:00
|
|
|
|
2021-06-09 10:22:27 -07:00
|
|
|
set -ex
|
2015-03-26 10:09:26 -07:00
|
|
|
|
2012-03-28 23:18:33 -04:00
|
|
|
# Get current directory for future use in links
|
2021-06-09 10:22:27 -07:00
|
|
|
VIM_SYNC_DIR=$(dirname "$0")
|
|
|
|
cd "$VIM_SYNC_DIR"
|
2012-10-23 10:52:47 -04:00
|
|
|
VIM_SYNC_DIR=$(pwd)
|
2012-03-28 23:18:33 -04:00
|
|
|
|
|
|
|
|
2015-03-26 17:45:03 -07:00
|
|
|
# Vim
|
2021-06-09 10:22:27 -07:00
|
|
|
[ -d "$HOME/.vim" ] || ln -s "$VIM_SYNC_DIR/vim" "$HOME/.vim"
|
|
|
|
[ -f "$HOME/.vimrc" ] || ln -s "$VIM_SYNC_DIR/vim/init.vim" "$HOME/.vimrc"
|
2015-03-26 17:45:03 -07:00
|
|
|
|
2021-06-09 10:22:27 -07:00
|
|
|
# Neovim
|
|
|
|
mkdir -p "${XDG_CONFIG_HOME:=$HOME/.config}"
|
2021-12-16 21:29:31 -08:00
|
|
|
[ -e "$XDG_CONFIG_HOME/nvim" ] || ln -s "$VIM_SYNC_DIR/neovim" "$XDG_CONFIG_HOME/nvim"
|
2015-10-27 22:56:35 -07:00
|
|
|
|
2012-07-02 13:25:36 -04:00
|
|
|
# Install all bundles
|
2012-07-03 10:13:15 -04:00
|
|
|
echo "Install all bundles"
|
2015-06-03 14:28:44 -07:00
|
|
|
if hash nvim 2>/dev/null; then
|
2024-09-17 12:58:06 -07:00
|
|
|
# Sync packer plugins
|
2024-09-17 13:10:27 -07:00
|
|
|
nvim --headless "+Lazy! restore" +qa
|
2024-09-17 12:58:06 -07:00
|
|
|
# Bootstrap treesitter parsers
|
2022-02-28 16:38:45 -08:00
|
|
|
nvim --headless -c "lua require('plugins.treesitter').bootstrap()" -c quitall
|
2015-06-03 14:28:44 -07:00
|
|
|
fi
|
2021-12-16 20:50:37 -08:00
|
|
|
if hash vim 2>/dev/null; then
|
2024-09-17 13:23:16 -07:00
|
|
|
vim +BlinkUpdate +qall
|
2021-12-16 20:50:37 -08:00
|
|
|
fi
|
2012-03-28 23:18:33 -04:00
|
|
|
|
2013-04-16 15:40:49 -07:00
|
|
|
|
2013-01-05 21:40:56 -05:00
|
|
|
echo "All done!"
|
|
|
|
exit 0
|