-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·79 lines (62 loc) · 2.02 KB
/
install.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
#!/bin/bash
set_symlinks() {
source ./set_symlink.sh
}
fetch_git_completions(){
curl -fLo ${HOME}/.git-prompt.sh \
https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
curl -fLo ${HOME}/.git-completion.bash \
https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
}
set_git_secrets(){
brew install git-secrets
git secrets --register-aws --global
git secrets --add 'private_key' --global
git secrets --add 'private_key_id' --global
}
fetch_dircolors(){
curl -fLo ${HOME}/.dircolors.256dark \
https://raw.githubusercontent.com/seebi/dircolors-solarized/master/dircolors.256dark
}
install_template() {
rm -f ${HOME}/.vim/template
ln -s $(pwd)/template ${HOME}/.vim/template
# nvim
rm -f ${HOME}/.config/nvim/templates
ln -s $(pwd)/template ${HOME}/.config/nvim/templates
}
install_vim_plugins(){
rm -r ${HOME}/.vim/autoload/plug.vim
mkdir -p ${HOME}/.vim/autoload
mkdir -p ${HOME}/.vim/colors
curl -fLo ${HOME}/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim +'PlugInstall --sync' +qa
# nvim
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
}
install_zplug() {
case "${OSTYPE}" in
darwin*)
;;
*)
sudo apt install locales-all
esac
if [[ ! -e ${HOME}/.zplug ]]; then
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
chmod -R 775 ${HOME}/.zplug
fi
}
install_coc_nvim() {
local coccommnmd='CocInstall -sync coc-pyright coc-json coc-tsserver coc-prettier coc-eslint @yaegassy/coc-volar coc-go coc-sh coc-pairs coc-java coc-lua'
vim +"$coccommnmd" +qa
}
set_symlinks
set_git_secrets
fetch_git_completions
fetch_dircolors
install_template
install_vim_plugins
install_zplug
install_coc_nvim