-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathneovim_setup.sh
More file actions
executable file
·41 lines (31 loc) · 843 Bytes
/
neovim_setup.sh
File metadata and controls
executable file
·41 lines (31 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
function check_nvim {
while true; do
read -p "Please Install nvim and node before setup starts. Is nvim, node installed? [Y/n]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo "Please install nvim first."
exit;;
* ) echo "Please answer yes or no.";;
esac
done
}
check_nvim
rm -rf .vim*
# Install universal-ctags (required for vim-gutentags)
if ! command -v ctags &> /dev/null; then
if [[ "$OSTYPE" == "darwin"* ]]; then
brew install universal-ctags
else
sudo apt-get install -y universal-ctags
fi
fi
# Setup neovim
mkdir -p $HOME/.config
ln -s $PWD/vim $HOME/.config/nvim
# Setup ctags config
mkdir -p $HOME/.ctags.d
mkdir -p $HOME/.ctags.d/tags
ln -sf $PWD/vim/ctags.d/default.ctags $HOME/.ctags.d/default.ctags
# Install neovim and coc plugins
nvim +PlugInstall