diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2022-12-17 23:43:26 +0100 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2022-12-17 23:43:26 +0100 |
| commit | cf8d89e46bdd636d0b28f047360943d21e3c6124 (patch) | |
| tree | 02295c9ef6f926055c3a0fb58bbb82416fa5ca7a /docs/dev | |
| parent | d8ddde27f9c37ba23b4eaab24759e2c1459e8ad4 (diff) | |
| download | rust-cf8d89e46bdd636d0b28f047360943d21e3c6124.tar.gz rust-cf8d89e46bdd636d0b28f047360943d21e3c6124.zip | |
Add a command to clear flycheck diagnostics
Diffstat (limited to 'docs/dev')
| -rw-r--r-- | docs/dev/lsp-extensions.md | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 308a92bebe0..1bbb4c2323c 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md @@ -1,5 +1,5 @@ <!--- -lsp_ext.rs hash: 1cb29d3afa36e743 +lsp_ext.rs hash: 45bd7985265725c5 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: @@ -459,6 +459,45 @@ Note that this functionality is intended primarily to inform the end user about In particular, it's valid for the client to completely ignore this extension. Clients are discouraged from but are allowed to use the `health` status to decide if it's worth sending a request to the server. +### Controlling Flycheck + +The flycheck/checkOnSave feature can be controlled via notifications sent by the client to the server. + +**Method:** `rust-analyzer/runFlycheck` + +**Notification:** + +```typescript +interface RunFlycheckParams { + /// The text document whose cargo workspace flycheck process should be started. + /// If the document is null or does not belong to a cargo workspace all flycheck processes will be started. + textDocument: lc.TextDocumentIdentifier | null; +} +``` + +Triggers the flycheck processes. + + +**Method:** `rust-analyzer/clearFlycheck` + +**Notification:** + +```typescript +interface ClearFlycheckParams {} +``` + +Clears the flycheck diagnostics. + +**Method:** `rust-analyzer/cancelFlycheck` + +**Notification:** + +```typescript +interface CancelFlycheckParams {} +``` + +Cancels all running flycheck processes. + ## Syntax Tree **Method:** `rust-analyzer/syntaxTree` |
