-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·55 lines (46 loc) · 1.56 KB
/
setup.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
#/bin/zsh
# Setups necessary packages.
#
HOME_DIR=$(realpath ~)
export DEFAULT_PATH="$HOME_DIR/.config"
setupPython ()
{
if ! command -v python &> /dev/null
then
# Devbox doesn't have a default python. So manually pick the highest one.
virtualenv --python="/usr/local/bin/python3.10" "$DEFAULT_PATH/py"
# virtualenv --python="/usr/bin/python3.10" "$DEFAULT_PATH/py"
# $DEFAULT_PATH/py/bin/pip3 install python-language-server debugpy pylint black pyright
$DEFAULT_PATH/py/bin/pip install python-language-server debugpy pylint black pyright pynvim
else
virtualenv "$DEFAULT_PATH/py"
$DEFAULT_PATH/py/bin/pip3 install pylint black pyright pynvim debugpy
fi
}
# Setup Java LSP(jdtls)
setupJDTLS ()
{
mkdir $DEFAULT_PATH/jdtls
cd $DEFAULT_PATH/jdtls
wget https://www.eclipse.org/downloads/download.php?file=/jdtls/snapshots/jdt-language-server-latest.tar.gz &&
tar -xzvf download.php\?file=%2Fjdtls%2Fsnapshots%2Fjdt-language-server-latest.tar.gz
rm -rf download.php\?file=%2Fjdtls%2Fsnapshots%2Fjdt-language-server-latest.tar.gz &&
mkdir data
}
setupJavaDebug ()
{
git clone https://github.com/microsoft/java-debug.git $DEFAULT_PATH/java-debug &&
cd $DEFAULT_PATH/java-debug
./mvnw clean install
}
setupVscodeJavaTest ()
{
git clone https://github.com/microsoft/vscode-java-test.git $DEFAULT_PATH/vscode-java-test &&
cd $DEFAULT_PATH/vscode-java-test
npm install
npm run build-plugin
}
setupPython
# setupJDTLS
# setupJavaDebug
# setupVscodeJavaTest