forked from mgile/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·63 lines (52 loc) · 1.22 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
#!/usr/bin/env bash
BREW_BUNDLE=false
LINK_DOTFILES=false
INIT_NVIM=false
flag=$1
if [[ "$flag" = "" ]]; then
flag="-a"
fi
if [[ "$flag" = "-a" ]]; then
LINK_DOTFILES=true
INIT_NVIM=true
BREW_BUNDLE=true
elif [[ "$flag" = "-l" ]]; then
LINK_DOTFILES=true
elif [[ "$flag" = "-n" ]]; then
echo "Initialize nvim set"
INIT_NVIM=true
elif [[ "$flag" = "-b" ]]; then
echo "Brew bundle set"
BREW_BUNDLE=true
fi
function link_all_dotfiles {
echo "Linking dotfiles"
rcup -d dotfiles -S config/nvim -S vim -v
}
function initialize_nvim_plugins {
echo "Initialize nvim plugins"
nvim +PlugInstall +qall
}
function initialize_nvim_coc_extensions {
echo "Initialize Coc extensions"
# https://github.com/neoclide/coc-rls
nvim -c 'CocInstall -sync coc-json coc-yaml coc-git coc-rls |q'
}
function brew_bundle {
brew bundle
}
tic tmux-256color.terminfo
if [[ "$BREW_BUNDLE" = "true" ]]; then
brew_bundle
fi
if [[ "$LINK_DOTFILES" = "true" ]]; then
link_all_dotfiles
fi
if [[ "$INIT_NVIM" = "true" ]]; then
initialize_nvim_plugins
initialize_nvim_coc_extensions
fi
echo "Remember to install bash-completions---"
echo "git"
echo "kubectl"
echo "rustup help completions"