-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_vim.sh
executable file
·153 lines (130 loc) · 4.08 KB
/
init_vim.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/usr/bin/env bash
_dir=$(realpath `dirname $0`)
source ${_dir}/.link_lib
install_language_tools()
{
# ======================
# some plugins depend on python-neovim
# ======================
sudo pacman -S --needed --noconfirm python-neovim
# ======================
# { html/css/js/ts support.
# ======================
sudo pacman -S --needed --noconfirm yarn eslint tidy
# install typescript for tsserver
yarn global add typescript csslint rome typescript-language-server
# ======================
# } html/css/js/ts support.
# ======================
# ======================
# { yaml support.
# ======================
sudo pacman -S --needed --noconfirm yamllint
# ======================
# } yaml support.
# ======================
# ======================
# { xml support.
# ======================
# xmllint
sudo pacman -S --needed --noconfirm libxml2
# ======================
# } xml support.
# ======================
# ======================
# { json support.
# ======================
sudo pacman -S --needed --noconfirm prettier
# ======================
# } json support.
# ======================
# ======================
# { bash support.
# ======================
sudo pacman -S --needed --noconfirm shfmt
yarn global add bash-language-server
# ======================
# } bash support.
# ======================
# ======================
# { ansible support.
# ======================
yarn global add @ansible/ansible-language-server
# ======================
# } ansible support.
# ======================
# ======================
# { c/c++ support.
# ======================
sudo pacman -S --needed --noconfirm clang ccls
# ======================
# } c/c++ support.
# ======================
# ======================
# { rust support.
# ======================
pacman -Q rust-analyzer
if [ $? -ne 0 ];then
sudo pacman -S --needed --noconfirm rust-analyzer
fi
# ======================
# } rust support end.
# ======================
# ======================
# { python support.
# ======================
sudo pacman -S --needed --noconfirm python-lsp-server python-pip flake8 autopep8 python-pylint
# ======================
# } python support end.
# ======================
# ======================
# { vim script lint support
pip install --user vim-vint
# } vim script lint support
# ======================
# ======================
# { go support
sudo pacman -S --needed --noconfirm gopls
# } go support
# ======================
# =====================
# { futter/dart support
sudo pacman -S --needed --noconfirm android-sdk android-platform android-sdk-build-tools android-sdk-platform-tools jdk8-openjdk chromium flutter
link {_,~/.}local/bin/dart_language_server
# }
# =====================
# =====================
# { zig support
sudo pacman -S --needed --noconfirm zig
yay -Sy zls-git
# }
# =====================
}
init_vim()
{
link _vimrc ~/.vimrc
link _ideavimrc ~/.ideavimrc
link asynctask.ini ~/.vim/tasks.ini
link /usr/bin/vim ~/.local/bin/vault-vim
if [ ! -e ~/.vim/autoload/plug.vim ];then
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
vim +PlugInstall +qall
}
init_nvim()
{
link _config/nvim ~/.config/nvim
if [ ! -e ~/.local/share/nvim/site/autoload/plug.vim ];then
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
if [ ! -e ~/.local/share/nvim/site/pack/packer/start/packer.nvim ]; then
git clone --depth 1 https://github.com/wbthomason/packer.nvim \
~/.local/share/nvim/site/pack/packer/start/packer.nvim
fi
nvim +PackerInstall +qall
}
install_language_tools
init_vim
init_nvim