-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup-lsp-dev.sh
executable file
·51 lines (41 loc) · 1.86 KB
/
setup-lsp-dev.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
#!/bin/bash
mkdir lsp-dev
cd lsp-dev
# git clone https://github.com/Microsoft/vscode-languageserver-node.git
# git clone git@github.com:Microsoft/vscode-languageserver-node.git
# git clone https://github.com/kieferrm/vscode-languageserver-node.git
git clone git@github.com:kieferrm/vscode-languageserver-node.git
cd vscode-languageserver-node
npm install
cd ..
# git clone https://github.com/Microsoft/vscode-extension-samples.git
# git clone git@github.com:Microsoft/vscode-extension-samples.git
# git clone https://github.com/kieferrm/vscode-extension-samples.git
git clone git@github.com:kieferrm/vscode-extension-samples.git
cd vscode-extension-samples/lsp-sample
npm install
cd ../..
# patch vscode.d.ts to use regular modules rather than global definitions
SCRIPTDIR=`dirname $0`
cp -f ../${SCRIPTDIR}/vscode-definitions/1.22.prerelease/vscode.d.ts vscode-languageserver-node/client/node_modules/vscode
cp -f ../${SCRIPTDIR}/vscode-definitions/1.22.prerelease/vscode.d.ts vscode-extension-samples/lsp-sample/client/node_modules/vscode
FOLDER=`pwd`
find ${FOLDER} -depth -name vscode-languageclient -exec rm -rf {} \;
find ${FOLDER} -depth -name vscode-jsonrpc -exec rm -rf {} \;
find ${FOLDER} -depth -name vscode-languageserver -exec rm -rf {} \;
find ${FOLDER} -depth -name vscode-languageserver-protocol -exec rm -rf {} \;
find ${FOLDER} -depth -name vscode-languageserver-types -exec rm -rf {} \;
mkdir node_modules
cd node_modules
ln -s ../vscode-languageserver-node/client vscode-languageclient
ln -s ../vscode-languageserver-node/jsonrpc vscode-jsonrpc
ln -s ../vscode-languageserver-node/server vscode-languageserver
ln -s ../vscode-languageserver-node/protocol vscode-languageserver-protocol
ln -s ../vscode-languageserver-node/types vscode-languageserver-types
cd ..
cd vscode-languageserver-node
npm run compile
cd ..
cd vscode-extension-samples/lsp-sample
npm run compile
cd ../..