Skip to content

Commit 8f2adcb

Browse files
authored
Docs: add server config (#849)
* add server config * update
1 parent 511a185 commit 8f2adcb

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

server/config.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Configuration
2+
3+
The ReScript Language Server support the folowing configuration.
4+
5+
These configurations are sent to the server on [initialization](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize)
6+
7+
```typescript
8+
interface config {
9+
/**
10+
* Format code using builtin formatter from server
11+
* @default false
12+
*/
13+
allowBuiltInFormatter: boolean;
14+
15+
/**
16+
* Whether you want the extension to prompt for autostarting a ReScript build if a project is opened with no build running
17+
* @default true
18+
*/
19+
askToStartBuild: boolean;
20+
21+
/**
22+
* Inlay Hint config
23+
*/
24+
inlayHints: {
25+
/**
26+
* Enable Inlay Hint
27+
* @defalt false
28+
*/
29+
enable: boolean;
30+
/**
31+
* Maximum length of character for inlay hints. Set to null to have an unlimited length. Inlay hints that exceed the maximum length will not be shown
32+
* @defalt 25
33+
*/
34+
maxLength: number | null;
35+
};
36+
/**
37+
* Enable CodeLens
38+
* @default false
39+
*/
40+
codeLens: boolean;
41+
/**
42+
* Path to the directory where cross-platform ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project.
43+
* @default null
44+
*/
45+
binaryPath: string | null;
46+
/**
47+
* Path to the directory where platform-specific ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project.
48+
* @default null
49+
*/
50+
platformPath: string | null;
51+
52+
/**
53+
* Signature Help config
54+
*/
55+
signatureHelp: {
56+
/**
57+
* Enable Signature Help
58+
* @default true
59+
*/
60+
enabled: boolean;
61+
};
62+
}
63+
```

0 commit comments

Comments
 (0)