Skip to content

Commit 20b37f2

Browse files
bors[bot]kjeremy
andauthored
Merge #5489
5489: Clarify initializationOptions r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
2 parents 1c7d5f5 + 9c0ead3 commit 20b37f2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/dev/lsp-extensions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ If you want to be notified about the changes to this document, subscribe to [#46
1111

1212
## `initializationOptions`
1313

14-
As `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration.
14+
For `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration.
1515
That is, `rust-analyzer` usually sends `"workspace/configuration"` request with `{ "items": ["rust-analyzer"] }` payload.
1616
`initializationOptions` should contain the same data that would be in the first item of the result.
17-
It's OK to not send anything, then all the settings would take their default values.
18-
However, some settings can not be changed after startup at the moment.
17+
If a language client does not know about `rust-analyzer`'s configuration options it can get sensible defaults by doing any of the following:
18+
* Not sending `initializationOptions`
19+
* Send `"initializationOptions": null`
20+
* Send `"initializationOptions": {}`
1921

2022
## Snippet `TextEdit`
2123

0 commit comments

Comments
 (0)