From aaa288126bd27f7b4d3d87827d1b8d3adf01d584 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 1 Jun 2020 17:42:46 +0200 Subject: Document initilizationOptions used by rust-analyzer --- docs/dev/lsp-extensions.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/dev') diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index dbc95be38..6b2d385fc 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md @@ -7,6 +7,14 @@ All capabilities are enabled via `experimental` field of `ClientCapabilities` or Requests which we hope to upstream live under `experimental/` namespace. Requests, which are likely to always remain specific to `rust-analyzer` are under `rust-analyzer/` namespace. +## `initializationOptions` + +As `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration. +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. +It's OK to not send anything, then all the settings would take their default values. +However, some settings can not be changed after startup at the moment. + ## Snippet `TextEdit` **Issue:** https://github.com/microsoft/language-server-protocol/issues/724 -- cgit v1.2.3 From 6370de444de0c4739d14000c0123b34c422a946a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 1 Jun 2020 17:51:15 +0200 Subject: Subscribe to protocol changes --- docs/dev/lsp-extensions.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/dev') diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 6b2d385fc..c57a93f12 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md @@ -7,6 +7,8 @@ All capabilities are enabled via `experimental` field of `ClientCapabilities` or Requests which we hope to upstream live under `experimental/` namespace. Requests, which are likely to always remain specific to `rust-analyzer` are under `rust-analyzer/` namespace. +If you want to be notified about the changes to this document, subscribe to [#4604](https://github.com/rust-analyzer/rust-analyzer/issues/4604). + ## `initializationOptions` As `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration. -- cgit v1.2.3