Skip to content

Commit abf7d17

Browse files
bors[bot]matklad
andauthored
Merge #4688
4688: Document initilizationOptions used by rust-analyzer r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents 4fe3744 + 6370de4 commit abf7d17

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/dev/lsp-extensions.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ All capabilities are enabled via `experimental` field of `ClientCapabilities` or
77
Requests which we hope to upstream live under `experimental/` namespace.
88
Requests, which are likely to always remain specific to `rust-analyzer` are under `rust-analyzer/` namespace.
99

10+
If you want to be notified about the changes to this document, subscribe to [#4604](https://github.com/rust-analyzer/rust-analyzer/issues/4604).
11+
12+
## `initializationOptions`
13+
14+
As `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration.
15+
That is, `rust-analyzer` usually sends `"workspace/configuration"` request with `{ "items": ["rust-analyzer"] }` payload.
16+
`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.
19+
1020
## Snippet `TextEdit`
1121

1222
**Issue:** https://github.com/microsoft/language-server-protocol/issues/724

0 commit comments

Comments
 (0)