-
Notifications
You must be signed in to change notification settings - Fork 8
/
install.ab
93 lines (81 loc) · 2.64 KB
/
install.ab
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
import { dir_exist } from "std"
fun get_download_path(repo, position) {
return unsafe $curl -sL https://api.github.com/repos/{repo}/releases | jq -r ".[0].assets.[{position}].browser_download_url"$
}
silent unsafe $cd /tmp$
echo "Install PHPactor LSP"
let download_url = get_download_path("phpactor/phpactor", 0)
$wget {download_url}$ failed {
echo "Error! Exit code: {status}"
}
silent unsafe {
$mv phpactor.phar /usr/local/bin$
$chmod +x /usr/local/bin/phpactor$
}
echo "Install Typos LSP"
let download_url = get_download_path("tekumara/typos-lsp", 6)
$wget {download_url}$ failed {
echo "Error! Exit code: {status}"
}
silent unsafe {
$tar -zxvf ./typos* -C ./typos-lsp$
$mv typos-lsp /usr/local/bin$
$chmod +x /usr/local/bin/typos-lsp$
}
echo "Install GitLab CI LSP"
let download_url = get_download_path("alesbrelih/gitlab-ci-ls", 3)
$wget {download_url}$ failed {
echo "Error! Exit code: {status}"
}
silent unsafe {
$mv x86_64-unknown-linux-gnu /usr/local/bin/gitlab-ci-ls$
$chmod +x /usr/local/bin/gitlab-ci-ls$
}
echo "Install HTMX LSP"
let download_url = get_download_path("ThePrimeagen/htmx-lsp", 2)
$wget {download_url}$ failed {
echo "Error! Exit code: {status}"
}
silent unsafe {
$mv htmx-lsp-linux-x64 /usr/local/bin/htmx-lsp$
$chmod +x /usr/local/bin/htmx-lsp$
}
echo "Install Marksman LSP"
let download_url = get_download_path("artempyanykh/marksman", 1)
$wget {download_url}$ failed {
echo "Error! Exit code: {status}"
}
silent unsafe {
$mv marksman-linux-x64 /usr/local/bin/marksman$
$chmod +x /usr/local/bin/marksman$
}
echo "Install Lua LSP"
if not dir_exist("/opt/lua-language-server") {
unsafe $cd /opt/$
unsafe $git clone https://github.com/LuaLS/lua-language-server$
} else {
unsafe $cd /opt/lua-language-server$
}
silent unsafe {
$cd lua-language-server$
$git pull$
$./make.sh$
$ln -s /opt/lua-language-server/bin/lua-language-server /usr/local/bin/lua-language-server$
}
silent unsafe $cd /tmp$
let npm_lsp = ["vscode-langservers-extracted", "@tailwindcss/language-server", "@olrtg/emmet-language-server", "intelephense", "bash-language-server"]
let npm_lsp_name = ["CSS, HTML, JSON LSP", "Tailwind LSP", "Emmet LSP", "Intelephense LSP", "Bash LSP"]
loop index, lsp in npm_lsp {
echo "Install {npm_lsp_name[index]}"
$npm i -g {lsp}$ failed {
echo "Error! Exit code: {status}"
}
}
let command_lsp = ["pip install python-lsp-server", "gem install ruby-lsp"]
let command_lsp_name = ["Python LSP", "Ruby LSP"]
loop index, lsp in command_lsp {
echo "Install {command_lsp_name[index]}"
${lsp}$ failed {
echo "Error! Exit code: {status}"
}
}