-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·84 lines (68 loc) · 1.58 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·84 lines (68 loc) · 1.58 KB
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
set -ex
all() {
setup_shell
TMPDIR=$(mktemp -d)
install_brew_deps
install_apk_deps
mkdir -p ${HOME}/.config
ln -sfn $(pwd) ${HOME}/.config/nvim
install_nvim_deps
setup_treesitter
}
install_brew_deps() {
if command -v brew > /dev/null; then
brew bundle
fi
}
install_apk_deps() {
if command -v apk > /dev/null; then
apk add nodejs npm ruby ruby-dev make clang ripgrep openssl
fi
}
install_nvim_deps() {
nvim -c "lua require('lazy').install()" -c "write ${TMPDIR}/PlugInstall.out" -c quitall
cat ${TMPDIR}/PlugInstall.out
nvim -c "lua require('lazy').health()" -c "write ${TMPDIR}/PlugStatus.out" -c quitall
cat ${TMPDIR}/PlugStatus.out
}
setup_treesitter() {
nvim +TSUpdateSync +quitall
}
setup_shell() {
if command -v nu > /dev/null; then
NUSHELL_PATH=$(which nu)
if [ "${NUSHELL_PATH}" != "/usr/bin/nu" ]; then
echo "Setting up NuShell to /usr/bin/nu"
ln -s ${NUSHELL_PATH} /usr/bin/nu || echo "unable to symlink nu to /usr/bin/nu, please do this manually"
fi
fi
}
lang_server() {
java() {
which brew && brew install jdtls
}
rust() {
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
~/.cargo/bin/rustup install stable
~/.cargo/bin/rustup component add clippy
}
go() {
GO111MODULE=on go get golang.org/x/tools/gopls@latest
}
typescript() {
npm install -g typescript typescript-language-server
}
bash() {
npm install -g bash-language-server
}
ruby() {
gem install -N solargraph
}
$1
}
if [ "$#" -eq 0 ]; then
set -- all
fi
invoke=${1}
shift
$invoke $@