@@ -9,31 +9,26 @@ This extension plugs in the following projects:
99- [ @rescript/language-server ] ( https://www.npmjs.com/package/@rescript/language-server )
1010 LSP
1111
12- ## Installing the language server
12+ ## Language Server
1313
14- The stable server is the default language server used by this extension . It uses
15- the pre-v2 versions of ` @rescript/language-server ` , and the extension installs
16- and updates that package automatically.
14+ The stable server is used by default . It is provided by the
15+ ` @rescript/language-server ` package, which the extension installs and updates
16+ automatically.
1717
18- Use ` settings.version ` when you need to pin a specific npm version. If it is
19- omitted, Zed installs the latest published stable version.
18+ Use ` settings.version ` to pin a specific npm version. If it is omitted, Zed
19+ installs the latest published stable version.
2020
21- > [ !NOTE]
22- > The experimental server is the v2 language server published to npm under the
23- > ` dev ` tag. Pin the package to the current ` dev ` version. See the version
24- > history on
25- > [ npm] ( https://www.npmjs.com/package/@rescript/language-server?activeTab=versions ) .
26-
27- > [ !TIP]
28- > You can install the language server globally with
29- > ` npm i -g @rescript/language-server@dev ` and set the binary path.
21+ > [ !TIP] To test the experimental language server (ReScript v13), use the
22+ > ` rescript lsp ` subcommand included with the compiler. Set the binary path and
23+ > arguments as follows:
3024>
3125> ``` json
3226> {
3327> "lsp": {
3428> "rescript-language-server": {
3529> "binary": {
36- > "path": "rescript-language-server"
30+ > "path": "node_modules/.bin/rescript",
31+ > "arguments": ["lsp", "--stdio"]
3732> }
3833> }
3934> }
@@ -46,15 +41,16 @@ omitted, Zed installs the latest published stable version.
4641{
4742 "lsp" : {
4843 "rescript-language-server" : {
49- // Server configuration for pre-v2 should be passed through initialization_options
44+ // Pass stable language server configuration through initialization_options
45+ // See https://github.com/rescript-lang/rescript-vscode/blob/441959d1feeaaffc1a589687758b1fbe1f649e72/server/src/config.ts#L5-L29
5046 "initialization_options" : {
5147 "extensionConfiguration" : {
5248 "askToStartBuild" : false ,
5349 },
5450 },
5551 "settings" : {
5652 "version" : " 1.71.0-next-441959d.0" ,
57- // Server configuration for v2 should be passed through settings.rescript
53+ // Pass experimental language server configuration through settings.rescript
5854 "rescript" : {
5955 "hover" : {
6056 "supportMarkdownLinks" : true ,
@@ -66,10 +62,6 @@ omitted, Zed installs the latest published stable version.
6662}
6763```
6864
69- ` initialization_options ` are passed to the language server (pre-v2) when it is started.
70- They can be used to configure the language server. See
71- [ extensionConfiguration] ( https://github.com/rescript-lang/rescript-vscode/blob/441959d1feeaaffc1a589687758b1fbe1f649e72/server/src/config.ts#L5-L29 )
72-
7365## Developing
7466
7567See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for instructions on how to develop this
0 commit comments