diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index e5ac10556d..87a15432a4 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -69,7 +69,7 @@ config_data! { cargo_buildScripts_enable: bool = "true", /// Override the command rust-analyzer uses to run build scripts and /// build procedural macros. The command is required to output json - /// and should therefor include `--message-format=json` or a similar + /// and should therefore include `--message-format=json` or a similar /// option. /// /// By default, a cargo invocation will be constructed for the configured @@ -81,7 +81,7 @@ config_data! { /// . cargo_buildScripts_overrideCommand: Option> = "null", /// Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to - /// avoid compiling unnecessary things. + /// avoid checking unnecessary things. cargo_buildScripts_useRustcWrapper: bool = "true", /// List of features to activate. /// @@ -107,15 +107,18 @@ config_data! { /// List of features to activate. Defaults to /// `#rust-analyzer.cargo.features#`. /// - /// Set to `"all"` to pass `--all-features` to cargo. + /// Set to `"all"` to pass `--all-features` to Cargo. checkOnSave_features: Option = "null", - /// Whether to pass `--no-default-features` to cargo. Defaults to + /// Whether to pass `--no-default-features` to Cargo. Defaults to /// `#rust-analyzer.cargo.noDefaultFeatures#`. checkOnSave_noDefaultFeatures: Option = "null", - /// Override the command rust-analyzer uses to run build scripts and - /// build procedural macros. The command is required to output json - /// and should therefor include `--message-format=json` or a similar - /// option. + /// Override the command rust-analyzer uses instead of `cargo check` for + /// diagnostics on save. The command is required to output json and + /// should therefor include `--message-format=json` or a similar option. + /// + /// If you're changing this because you're using some tool wrapping + /// Cargo, you might also want to change + /// `#rust-analyzer.cargo.buildScripts.overrideCommand#`. /// /// An example command would be: /// diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index 981132f9c4..b0f2f1614d 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc @@ -29,7 +29,7 @@ Run build scripts (`build.rs`) for more precise code analysis. -- Override the command rust-analyzer uses to run build scripts and build procedural macros. The command is required to output json -and should therefor include `--message-format=json` or a similar +and should therefore include `--message-format=json` or a similar option. By default, a cargo invocation will be constructed for the configured @@ -44,7 +44,7 @@ cargo check --quiet --workspace --message-format=json --all-targets + -- Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to -avoid compiling unnecessary things. +avoid checking unnecessary things. -- [[rust-analyzer.cargo.features]]rust-analyzer.cargo.features (default: `[]`):: + @@ -99,21 +99,24 @@ Extra arguments for `cargo check`. List of features to activate. Defaults to `#rust-analyzer.cargo.features#`. -Set to `"all"` to pass `--all-features` to cargo. +Set to `"all"` to pass `--all-features` to Cargo. -- [[rust-analyzer.checkOnSave.noDefaultFeatures]]rust-analyzer.checkOnSave.noDefaultFeatures (default: `null`):: + -- -Whether to pass `--no-default-features` to cargo. Defaults to +Whether to pass `--no-default-features` to Cargo. Defaults to `#rust-analyzer.cargo.noDefaultFeatures#`. -- [[rust-analyzer.checkOnSave.overrideCommand]]rust-analyzer.checkOnSave.overrideCommand (default: `null`):: + -- -Override the command rust-analyzer uses to run build scripts and -build procedural macros. The command is required to output json -and should therefor include `--message-format=json` or a similar -option. +Override the command rust-analyzer uses instead of `cargo check` for +diagnostics on save. The command is required to output json and +should therefor include `--message-format=json` or a similar option. + +If you're changing this because you're using some tool wrapping +Cargo, you might also want to change +`#rust-analyzer.cargo.buildScripts.overrideCommand#`. An example command would be: diff --git a/editors/code/package.json b/editors/code/package.json index ac7dcfac64..7ecc1fdca3 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -412,7 +412,7 @@ "type": "boolean" }, "rust-analyzer.cargo.buildScripts.overrideCommand": { - "markdownDescription": "Override the command rust-analyzer uses to run build scripts and\nbuild procedural macros. The command is required to output json\nand should therefor include `--message-format=json` or a similar\noption.\n\nBy default, a cargo invocation will be constructed for the configured\ntargets and features, with the following base command line:\n\n```bash\ncargo check --quiet --workspace --message-format=json --all-targets\n```\n.", + "markdownDescription": "Override the command rust-analyzer uses to run build scripts and\nbuild procedural macros. The command is required to output json\nand should therefore include `--message-format=json` or a similar\noption.\n\nBy default, a cargo invocation will be constructed for the configured\ntargets and features, with the following base command line:\n\n```bash\ncargo check --quiet --workspace --message-format=json --all-targets\n```\n.", "default": null, "type": [ "null", @@ -423,7 +423,7 @@ } }, "rust-analyzer.cargo.buildScripts.useRustcWrapper": { - "markdownDescription": "Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to\navoid compiling unnecessary things.", + "markdownDescription": "Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to\navoid checking unnecessary things.", "default": true, "type": "boolean" }, @@ -500,7 +500,7 @@ } }, "rust-analyzer.checkOnSave.features": { - "markdownDescription": "List of features to activate. Defaults to\n`#rust-analyzer.cargo.features#`.\n\nSet to `\"all\"` to pass `--all-features` to cargo.", + "markdownDescription": "List of features to activate. Defaults to\n`#rust-analyzer.cargo.features#`.\n\nSet to `\"all\"` to pass `--all-features` to Cargo.", "default": null, "anyOf": [ { @@ -524,7 +524,7 @@ ] }, "rust-analyzer.checkOnSave.noDefaultFeatures": { - "markdownDescription": "Whether to pass `--no-default-features` to cargo. Defaults to\n`#rust-analyzer.cargo.noDefaultFeatures#`.", + "markdownDescription": "Whether to pass `--no-default-features` to Cargo. Defaults to\n`#rust-analyzer.cargo.noDefaultFeatures#`.", "default": null, "type": [ "null", @@ -532,7 +532,7 @@ ] }, "rust-analyzer.checkOnSave.overrideCommand": { - "markdownDescription": "Override the command rust-analyzer uses to run build scripts and\nbuild procedural macros. The command is required to output json\nand should therefor include `--message-format=json` or a similar\noption.\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.", + "markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefor include `--message-format=json` or a similar option.\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.", "default": null, "type": [ "null", @@ -1116,11 +1116,6 @@ "Search in current workspace and dependencies." ] }, - "rust-analyzer.restartServerOnConfigChange": { - "markdownDescription": "Whether to restart the server automatically when certain settings that require a restart are changed.", - "default": false, - "type": "boolean" - }, "$generated-end": {} } },