Skip to content

Commit 927bb5b

Browse files
committed
update readme
1 parent 1e609c1 commit 927bb5b

File tree

2 files changed

+158
-166
lines changed

2 files changed

+158
-166
lines changed

README.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,42 @@
22

33
A LSP server for [source](https://github.com/source-academy/js-slang)
44

5-
# Setup
5+
## Use
66

7-
First run these commands:
7+
The code for the lsp is in `/server` but code for testing the lsp is provided in `/client`. If you want to use this lsp in your own VSCode extension, download the
8+
latest version from the [releases](https://github.com/mug1wara26/source-lsp/releases) page, and copy the set up in `client/src/extension.ts`.
9+
Ensure that the lines
10+
11+
```
12+
const serverModule = context.asAbsolutePath(
13+
path.join("dist", 'source-lsp.js')
14+
);
15+
```
16+
17+
point to the correct path to the downloaded lsp file.
18+
19+
If you want to test out the lsp, you can clone the repo and open up VSCode
820

921
```console
10-
git clone https://github.com/mug1wara26/source-lsp
11-
cd source-lsp
12-
npm i
22+
git clone https://github.com/mug1wara26/source-lsp && cd source-lsp
23+
npm i
24+
code .
1325
```
1426

15-
In vscode, press ctrl + shift + b to build, then press F5 to run the plugin. You can open the scripts in test_files for testing
27+
Then press ctrl + shift + b and enter to build, then press f5 to run the plugin.
28+
29+
## Features
30+
31+
Currently, the following language features are supported:
32+
33+
* Completion
34+
* Go to declaration
35+
* Highlight names
36+
* Document Symbols
37+
* Rename symbol
38+
* Hover information
39+
* Diagnostics
40+
41+
## Documentation
42+
43+
Documentation for diagnostics can be found [here](server/src/rules)

0 commit comments

Comments
 (0)