plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.allTargets

Check all targets and tests (--all-targets). Defaults to #rust-analyzer.cargo.allTargets#.

Type: null or boolean

Default: null

Plugin default: null

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.command

Cargo command to use for cargo check.

Type: null or string

Default: null

Plugin default: "check"

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.extraArgs

Extra arguments for cargo check.

Type: null or (list of string)

Default: null

Plugin default: [ ]

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.extraEnv

Extra environment variables that will be set when running cargo check. Extends #rust-analyzer.cargo.extraEnv#.

Type: null or (attribute set of anything)

Default: null

Plugin default: { }

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.features

List of features to activate. Defaults to #rust-analyzer.cargo.features#.

Set to "all" to pass --all-features to Cargo.

Values:

  • all: Pass --all-features to cargo

Type: null or value “all” (singular enum) or list of string

Default: null

Plugin default: null

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.ignore

List of cargo check (or other command specified in check.command) diagnostics to ignore.

For example for cargo check: dead_code, unused_imports, unused_variables,…

Type: null or (list of string)

Default: null

Plugin default: [ ]

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.invocationStrategy

Specifies the invocation strategy to use when running the check command. If per_workspace is set, the command will be executed for each workspace. If once is set, the command will be executed once. This config only has an effect when #rust-analyzer.check.overrideCommand# is set.

Values:

  • per_workspace: The command will be executed for each Rust workspace with the workspace as the working directory.
  • once: The command will be executed once with the opened project as the working directory.

Type: null or one of “per_workspace”, “once”

Default: null

Plugin default: "per_workspace"

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.noDefaultFeatures

Whether to pass --no-default-features to Cargo. Defaults to #rust-analyzer.cargo.noDefaultFeatures#.

Type: null or boolean

Default: null

Plugin default: null

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.overrideCommand

Override the command rust-analyzer uses instead of cargo check for diagnostics on save. The command is required to output json and should therefore include --message-format=json or a similar option (if your client supports the colorDiagnosticOutput experimental capability, you can use --message-format=json-diagnostic-rendered-ansi).

If you’re changing this because you’re using some tool wrapping Cargo, you might also want to change #rust-analyzer.cargo.buildScripts.overrideCommand#.

If there are multiple linked projects/workspaces, this command is invoked for each of them, with the working directory being the workspace root (i.e., the folder containing the Cargo.toml). This can be overwritten by changing #rust-analyzer.check.invocationStrategy#.

If $saved_file is part of the command, rust-analyzer will pass the absolute path of the saved file to the provided command. This is intended to be used with non-Cargo build systems. Note that $saved_file is experimental and may be removed in the future.

An example command would be:

cargo check --workspace --message-format=json --all-targets

.

Type: null or (list of string)

Default: null

Plugin default: null

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.targets

Check for specific targets. Defaults to #rust-analyzer.cargo.target# if empty.

Can be a single target, e.g. "x86_64-unknown-linux-gnu" or a list of targets, e.g. ["aarch64-apple-darwin", "x86_64-apple-darwin"].

Aliased as "checkOnSave.targets".

Type: null or string or list of string

Default: null

Plugin default: null

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.check.workspace

Whether --workspace should be passed to cargo check. If false, -p <package> will be passed instead.

Type: null or boolean

Default: null

Plugin default: true