Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'docs/user/manual.adoc')
-rw-r--r--docs/user/manual.adoc9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 8567b81b00..ee42702660 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -616,6 +616,15 @@ See https://github.com/rust-analyzer/rust-project.json-example for a small examp
You can set `RA_LOG` environmental variable to `rust_analyzer=info` to inspect how rust-analyzer handles config and project loading.
+Note that calls to `cargo check` are disabled when using `rust-project.json` by default, so compilation errors and warnings will no longer be sent to your LSP client. To enable these compilation errors you will need to specify explicitly what command rust-analyzer should run to perform the checks using the `checkOnSave.overrideCommand` configuration. As an example, the following configuration explicitly sets `cargo check` as the `checkOnSave` command.
+
+[source,json]
+----
+{ "rust-analyzer.checkOnSave.overrideCommand": ["cargo", "check", "--message-format=json"] }
+----
+
+The `checkOnSave.overrideCommand` requires the command specified to output json error messages for rust-analyzer to consume. The `--message-format=json` flag does this for `cargo check` so whichever command you use must also output errors in this format. See the <<Configuration>> section for more information.
+
== Security
At the moment, rust-analyzer assumes that all code is trusted.