aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/lsp-extensions.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev/lsp-extensions.md')
-rw-r--r--docs/dev/lsp-extensions.md20
1 files changed, 13 insertions, 7 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md
index a46121bb2..f0f981802 100644
--- a/docs/dev/lsp-extensions.md
+++ b/docs/dev/lsp-extensions.md
@@ -1,8 +1,8 @@
1<!--- 1<!---
2lsp_ext.rs hash: faae991334a151d0 2lsp_ext.rs hash: 28a9d5a24b7ca396
3 3
4If you need to change the above hash to make the test pass, please check if you 4If you need to change the above hash to make the test pass, please check if you
5need to adjust this doc as well and ping this issue: 5need to adjust this doc as well and ping this issue:
6 6
7 https://github.com/rust-analyzer/rust-analyzer/issues/4604 7 https://github.com/rust-analyzer/rust-analyzer/issues/4604
8 8
@@ -46,6 +46,7 @@ If this capability is set, `WorkspaceEdit`s returned from `codeAction` requests
46```typescript 46```typescript
47interface SnippetTextEdit extends TextEdit { 47interface SnippetTextEdit extends TextEdit {
48 insertTextFormat?: InsertTextFormat; 48 insertTextFormat?: InsertTextFormat;
49 annotationId?: ChangeAnnotationIdentifier;
49} 50}
50``` 51```
51 52
@@ -421,7 +422,7 @@ Reloads project information (that is, re-executes `cargo metadata`).
421 422
422## Server Status 423## Server Status
423 424
424**Experimental Client Capability:** `{ "serverStatus": boolean }` 425**Experimental Client Capability:** `{ "serverStatusNotification": boolean }`
425 426
426**Method:** `experimental/serverStatus` 427**Method:** `experimental/serverStatus`
427 428
@@ -432,11 +433,13 @@ interface ServerStatusParams {
432 /// `ok` means that the server is completely functional. 433 /// `ok` means that the server is completely functional.
433 /// 434 ///
434 /// `warning` means that the server is partially functional. 435 /// `warning` means that the server is partially functional.
435 /// It can server requests, but some results might be wrong due to, 436 /// It can answer correctly to most requests, but some results
436 /// for example, some missing dependencies. 437 /// might be wrong due to, for example, some missing dependencies.
437 /// 438 ///
438 /// `error` means that the server is not functional. For example, 439 /// `error` means that the server is not functional. For example,
439 /// there's a fatal build configuration problem. 440 /// there's a fatal build configuration problem. The server might
441 /// still give correct answers to simple requests, but most results
442 /// will be incomplete or wrong.
440 health: "ok" | "warning" | "error", 443 health: "ok" | "warning" | "error",
441 /// Is there any pending background work which might change the status? 444 /// Is there any pending background work which might change the status?
442 /// For example, are dependencies being downloaded? 445 /// For example, are dependencies being downloaded?
@@ -450,6 +453,9 @@ This notification is sent from server to client.
450The client can use it to display *persistent* status to the user (in modline). 453The client can use it to display *persistent* status to the user (in modline).
451It is similar to the `showMessage`, but is intended for stares rather than point-in-time events. 454It is similar to the `showMessage`, but is intended for stares rather than point-in-time events.
452 455
456Note that this functionality is intended primarily to inform the end user about the state of the server.
457In particular, it's valid for the client to completely ignore this extension.
458Clients are discouraged from but are allowed to use the `health` status to decide if it's worth sending a request to the server.
453 459
454## Syntax Tree 460## Syntax Tree
455 461
@@ -620,7 +626,7 @@ This request is sent from client to server to move item under cursor or selectio
620 626
621**Request:** `MoveItemParams` 627**Request:** `MoveItemParams`
622 628
623**Response:** `TextDocumentEdit | null` 629**Response:** `SnippetTextEdit[]`
624 630
625```typescript 631```typescript
626export interface MoveItemParams { 632export interface MoveItemParams {