-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·128 lines (108 loc) · 2.64 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
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
#!/usr/bin/env bash
set -euo pipefail
main() {
install_spell
install_node
install_sh
install_json
install_rust
install_web
install_solidity
install_latex
install_org
install_lookup
install_youdao
install_wakatime
sync_doom
}
sync_doom() {
~/.emacs.d/bin/doom env
}
install_spell() {
echo "Installing dependencies for spell..."
brew install aspell
}
install_clang() {
echo "Installing dependencies for clang..."
brew install clang-format
}
install_node() {
echo "Installing dependencies for nodejs..."
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
nvm install lts/erbium
}
install_sh() {
echo "Installing dependencies for shell..."
brew install shellcheck
brew install shfmt
npm install -g bash-language-server
}
install_json() {
echo "Installing dependencies for json..."
brew install jq
}
install_rust() {
echo "Installing dependencies for rust..."
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >>~/.zshrc
rustup toolchain add nightly
rustup default nightly
# completion
cargo +nightly install racer
rustup component add rust-src
echo 'export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/library"' >>~/.zshrc
# Old rust version (Select automatically in config.el)
# echo 'export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"' >>~/.zshrc
cargo install cargo-edit
cargo install cargo-audit
# lint
rustup component add clippy
# format
rustup component add rustfmt
npm i -g prettier-plugin-toml
}
install_web() {
echo "Installing dependencies for web..."
brew install tidy-html5
npm install -g typescript
npm install -g eslint
# npm install -g tslint
npm install -g typescript-eslint
npm install -g prettier
# npm install -g prettier-plugin-svelte
# web-mode
npm install -g stylelint
npm install -g js-beautify
# lsp
npm install -g vscode-html-languageserver-bin
npm install -g vscode-css-languageserver-bin
npm install -g typescript-language-server
# npm install -g vls
# npm install -g svelte-language-server
}
install_solidity() {
echo "Installing dependencies for solidity..."
npm install -g solc solium prettier-plugin-solidity
}
intsall_latex() {
brew cask install mactex
}
install_org() {
brew install sqlite
}
install_lookup() {
brew install ripgrep
# brew install wordnet
}
install_youdao() {
echo "Installing dependencies for youdao..."
brew install mpg123
}
install_wakatime() {
echo "Installing dependencies for wakatime..."
pip install wakatime
# oh-my-zsh
git clone https://github.com/wbingli/zsh-wakatime.git ~/.oh-my-zsh/custom/plugins/zsh-wakatime
}
main
exit