-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·74 lines (60 loc) · 2.44 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
#!/bin/bash
unameOut="$(uname -s)"
case "${unameOut}" in
Darwin*) os=mac;;
MINGW*) os=win;;
*) os=linux;;
esac
#
# Emacs
#
# if [ ! -d "$HOME/.config/emacs" ]; then
# git clone --depth 1 [email protected]:doomemacs/doomemacs $HOME/.config/emacs
# $HOME/.config/emacs/bin/doom install
# fi
#
# fzf
#
if [ ! -d "$HOME/.fzf" ]; then
# git clone --depth 1 [email protected]:thiago-negri/fzf.git $HOME/.fzf
git clone --depth 1 [email protected]:junegunn/fzf.git $HOME/.fzf
$HOME/.fzf/install --key-bindings --completion --no-update-rc
fi
#
# zsh
#
[ ! -d "$HOME/.tmp" ] && mkdir $HOME/.tmp
cat zshrc > $HOME/.zshrc
[[ "$os" = "mac" ]] && cat zshrc_mac >> $HOME/.zshrc
[[ "$os" = "win" ]] && cat zshrc_win >> $HOME/.zshrc
#
# vim
#
# vim packages
[ ! -d "$HOME/.vim/pack" ] && mkdir -p $HOME/.vim/pack/downloads/{start,opt}
cd "$HOME/.vim/pack/downloads/opt"
# [ ! -d "./fzf.vim" ] && git clone --depth 1 [email protected]:thiago-negri/fzf.vim.git
[ ! -d "./fzf.vim" ] && git clone --depth 1 [email protected]:junegunn/fzf.vim.git
[ ! -d "./lsp" ] && git clone --depth 1 [email protected]:yegappan/lsp.git
[ ! -d "./vim-commentary" ] && git clone --depth 1 [email protected]:tpope/vim-commentary.git
[ ! -d "./vim-dark" ] && git clone --depth 1 [email protected]:thiago-negri/vim-dark.git
[ ! -d "./vim-easymotion" ] && git clone --depth 1 [email protected]:easymotion/vim-easymotion.git
[ ! -d "./vim-fugitive" ] && git clone --depth 1 [email protected]:tpope/vim-fugitive.git
[ ! -d "./vim-graphql" ] && git clone --depth 1 [email protected]:jparise/vim-graphql.git
[ ! -d "./vim-highlightedyank" ] && git clone --depth 1 [email protected]:machakann/vim-highlightedyank.git
[ ! -d "./vim-sleuth" ] && git clone --depth 1 [email protected]:tpope/vim-sleuth.git
[ ! -d "./vim-surround" ] && git clone --depth 1 [email protected]:tpope/vim-surround.git
[ ! -d "./vim-vinegar" ] && git clone --depth 1 [email protected]:tpope/vim-vinegar.git
cd - >/dev/null
# vimrc
cat vimrc > $HOME/.vimrc
[[ "$os" = "mac" ]] && cat vimrc_mac >> $HOME/.vimrc
[[ "$os" = "win" ]] && cat vimrc_win >> $HOME/.vimrc
# vim filetypes
mkdir -p $HOME/.vim/ftplugin
cp vimrc_gitcommit $HOME/.vim/ftplugin/gitcommit.vim
# vim LSPs
[ ! -d "$HOME/.vim/lsps" ] && mkdir -p $HOME/.vim/lsps
cd $HOME/.vim/lsps
[ ! -d "./node_modules/typescript-language-server" ] && npm i typescript-language-server
cd - >/dev/null