mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Merge #5489
5489: Clarify initializationOptions r=matklad a=kjeremy Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
This commit is contained in:
commit
20b37f264f
1 changed files with 5 additions and 3 deletions
|
@ -11,11 +11,13 @@ If you want to be notified about the changes to this document, subscribe to [#46
|
||||||
|
|
||||||
## `initializationOptions`
|
## `initializationOptions`
|
||||||
|
|
||||||
As `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration.
|
For `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration.
|
||||||
That is, `rust-analyzer` usually sends `"workspace/configuration"` request with `{ "items": ["rust-analyzer"] }` payload.
|
That is, `rust-analyzer` usually sends `"workspace/configuration"` request with `{ "items": ["rust-analyzer"] }` payload.
|
||||||
`initializationOptions` should contain the same data that would be in the first item of the result.
|
`initializationOptions` should contain the same data that would be in the first item of the result.
|
||||||
It's OK to not send anything, then all the settings would take their default values.
|
If a language client does not know about `rust-analyzer`'s configuration options it can get sensible defaults by doing any of the following:
|
||||||
However, some settings can not be changed after startup at the moment.
|
* Not sending `initializationOptions`
|
||||||
|
* Send `"initializationOptions": null`
|
||||||
|
* Send `"initializationOptions": {}`
|
||||||
|
|
||||||
## Snippet `TextEdit`
|
## Snippet `TextEdit`
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue