Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'docs/dev/lsp-extensions.md')
| -rw-r--r-- | docs/dev/lsp-extensions.md | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index a4ad3e5a55..bc58aa7220 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md @@ -1,5 +1,5 @@ <!--- -lsp_ext.rs hash: fdf1afd34548abbc +lsp_ext.rs hash: 2d60bbffe70ae198 If you need to change the above hash to make the test pass, please check if you need to adjust this doc as well and ping this issue: @@ -386,14 +386,26 @@ rust-analyzer supports only one `kind`, `"cargo"`. The `args` for `"cargo"` look ## Open External Documentation -This request is sent from client to server to get a URL to documentation for the symbol under the cursor, if available. +This request is sent from the client to the server to obtain web and local URL(s) for documentation related to the symbol under the cursor, if available. -**Method** `experimental/externalDocs` +**Method:** `experimental/externalDocs` -**Request:**: `TextDocumentPositionParams` +**Request:** `TextDocumentPositionParams` + +**Response:** `string | null` -**Response** `string | null` +## Local Documentation +**Experimental Client Capability:** `{ "localDocs": boolean }` + +If this capability is set, the `Open External Documentation` request returned from the server will have the following structure: + +```typescript +interface ExternalDocsResponse { + web?: string; + local?: string; +} +``` ## Analyzer Status @@ -863,7 +875,7 @@ export interface Diagnostic { export interface FetchDependencyListParams {} ``` -**Response:** +**Response:** ```typescript export interface FetchDependencyListResult { crates: { @@ -873,4 +885,4 @@ export interface FetchDependencyListResult { }[]; } ``` -Returns all crates from this workspace, so it can be used create a viewTree to help navigate the dependency tree.
\ No newline at end of file +Returns all crates from this workspace, so it can be used create a viewTree to help navigate the dependency tree. |