2020-11-21 18:07:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
DIR=$(dirname "$(readlink -f "$0")")
|
|
|
|
. "$DIR/../env.sh"
|
|
|
|
|
|
|
|
log 'Setting up vim'
|
|
|
|
|
|
|
|
# check dependencies
|
2022-05-15 03:34:22 +00:00
|
|
|
#if [ "$VIM_MODE" = "enhanced" ]; then
|
|
|
|
#if ! has_cmd node; then
|
|
|
|
#"$PDIR/devel/nodejs.sh"
|
|
|
|
#fi
|
|
|
|
#if ! has_cmd python; then
|
|
|
|
#"$PDIR/devel/python.sh"
|
|
|
|
#fi
|
|
|
|
#fi
|
2020-11-21 18:07:26 +00:00
|
|
|
|
2021-09-16 10:18:10 +00:00
|
|
|
# install vim
|
|
|
|
export VIM=vim
|
2022-05-15 03:34:22 +00:00
|
|
|
case "$PM" in
|
|
|
|
apt)
|
|
|
|
# gui-common is required for clipboard integration
|
2022-12-05 12:55:00 +00:00
|
|
|
# sudo add-apt-repository ppa:jonathonf/vim -y -n
|
|
|
|
# pm_update
|
|
|
|
# sudo apt install -y vim vim-gui-common
|
|
|
|
# if enhance_vim; then
|
|
|
|
# sudo pip3 install pyvim
|
|
|
|
# fi
|
|
|
|
sudo add-apt-repository ppa:neovim-ppa/stable
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install neovim ripgrep
|
2022-05-15 03:34:22 +00:00
|
|
|
;;
|
|
|
|
pacman)
|
2022-07-06 14:50:45 +00:00
|
|
|
#sudo pacman -S --noconfirm --needed neovim ripgrep
|
|
|
|
#git clone --depth 1 https://github.com/wbthomason/packer.nvim \
|
|
|
|
#~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
2022-05-15 03:34:22 +00:00
|
|
|
#if enhance_vim; then
|
|
|
|
#sudo pip install pyvim neovim
|
|
|
|
#fi
|
|
|
|
sudo pacman -S --noconfirm --needed nodejs npm yarn vim
|
2022-07-06 14:50:45 +00:00
|
|
|
#if enhance_vim; then
|
|
|
|
#$PDIR/devel/nodejs.sh config
|
|
|
|
#sudo pip install pyvim
|
|
|
|
#fi
|
2022-05-15 03:34:22 +00:00
|
|
|
;;
|
|
|
|
esac
|
2020-11-21 18:07:26 +00:00
|
|
|
|
2022-12-05 12:55:00 +00:00
|
|
|
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
|
|
|
~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
|
|
|
|
2022-12-05 13:26:55 +00:00
|
|
|
# lua-language-server https://github.com/sumneko/lua-language-server/releases
|
|
|
|
|
2020-11-21 18:07:26 +00:00
|
|
|
# symlink configuration
|
2021-09-16 10:18:10 +00:00
|
|
|
#sudo ln -sf "$(command -v vim)" /usr/bin/v
|
2022-07-06 14:50:45 +00:00
|
|
|
lnsf "$DIR/vim/neovim/init.lua" "$XDG_CONFIG_HOME/nvim/init.lua"
|
|
|
|
lnsf "$DIR/vim/neovim/lua" "$XDG_CONFIG_HOME/nvim/lua"
|
|
|
|
lnsf "$DIR/vim/vim/vimrc" "$HOME/.vimrc"
|
2020-11-21 18:07:26 +00:00
|
|
|
lnsf "$DIR/vim/coc-settings.json" "$XDG_CONFIG_HOME/nvim/coc-settings.json"
|
|
|
|
lnsf "$DIR/vim/coc-settings.json" "$HOME/.vim/coc-settings.json"
|