summaryrefslogtreecommitdiffstats
path: root/src/tools/rust-analyzer/docs/dev
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rust-analyzer/docs/dev')
-rw-r--r--src/tools/rust-analyzer/docs/dev/README.md7
-rw-r--r--src/tools/rust-analyzer/docs/dev/lsp-extensions.md67
-rw-r--r--src/tools/rust-analyzer/docs/dev/style.md2
3 files changed, 71 insertions, 5 deletions
diff --git a/src/tools/rust-analyzer/docs/dev/README.md b/src/tools/rust-analyzer/docs/dev/README.md
index 4ac75b4bb..cdab6b099 100644
--- a/src/tools/rust-analyzer/docs/dev/README.md
+++ b/src/tools/rust-analyzer/docs/dev/README.md
@@ -200,7 +200,7 @@ Look for `fn benchmark_xxx` tests for a quick way to reproduce performance probl
## Release Process
-Release process is handled by `release`, `dist` and `promote` xtasks, `release` being the main one.
+Release process is handled by `release`, `dist`, `publish-release-notes` and `promote` xtasks, `release` being the main one.
`release` assumes that you have checkouts of `rust-analyzer`, `rust-analyzer.github.io`, and `rust-lang/rust` in the same directory:
@@ -231,8 +231,9 @@ Release steps:
* create a new changelog in `rust-analyzer.github.io`
3. While the release is in progress, fill in the changelog
4. Commit & push the changelog
-5. Tweet
-6. Inside `rust-analyzer`, run `cargo xtask promote` -- this will create a PR to rust-lang/rust updating rust-analyzer's subtree.
+5. Run `cargo xtask publish-release-notes <CHANGELOG>` -- this will convert the changelog entry in AsciiDoc to Markdown and update the body of GitHub Releases entry.
+6. Tweet
+7. Inside `rust-analyzer`, run `cargo xtask promote` -- this will create a PR to rust-lang/rust updating rust-analyzer's subtree.
Self-approve the PR.
If the GitHub Actions release fails because of a transient problem like a timeout, you can re-run the job from the Actions console.
diff --git a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md
index fe316fcae..a4780af1a 100644
--- a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md
+++ b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md
@@ -1,5 +1,5 @@
<!---
-lsp_ext.rs hash: 62068e53ac202dc8
+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`
@@ -753,3 +792,29 @@ export interface ClientCommandOptions {
commands: string[];
}
```
+
+## Colored Diagnostic Output
+
+**Experimental Client Capability:** `{ "colorDiagnosticOutput": boolean }`
+
+If this capability is set, the "full compiler diagnostics" provided by `checkOnSave`
+will include ANSI color and style codes to render the diagnostic in a similar manner
+as `cargo`. This is translated into `--message-format=json-diagnostic-rendered-ansi`
+when flycheck is run, instead of the default `--message-format=json`.
+
+The full compiler rendered diagnostics are included in the server response
+regardless of this capability:
+
+```typescript
+// https://microsoft.github.io/language-server-protocol/specifications/specification-current#diagnostic
+export interface Diagnostic {
+ ...
+ data?: {
+ /**
+ * The human-readable compiler output as it would be printed to a terminal.
+ * Includes ANSI color and style codes if the client has set the experimental
+ * `colorDiagnosticOutput` capability.
+ */
+ rendered?: string;
+ };
+}
diff --git a/src/tools/rust-analyzer/docs/dev/style.md b/src/tools/rust-analyzer/docs/dev/style.md
index a80eebd63..d2a03fba4 100644
--- a/src/tools/rust-analyzer/docs/dev/style.md
+++ b/src/tools/rust-analyzer/docs/dev/style.md
@@ -101,7 +101,7 @@ Including a description and GIF suitable for the changelog means less work for t
We don't enforce Clippy.
A number of default lints have high false positive rate.
-Selectively patching false-positives with `allow(clippy)` is considered worse than not using Clippy at all.
+Selectively patching false-positives with `allow(clippy)` is probably worse than entirely disabling a problematic lint.
There's a `cargo lint` command which runs a subset of low-FPR lints.
Careful tweaking of `lint` is welcome.
Of course, applying Clippy suggestions is welcome as long as they indeed improve the code.