plugins.rust-tools.server.cargo.allTargets

Pass --all-targets to cargo invocation.

default:

true

Type: null or boolean

Default: null

Declared by:

plugins.rust-tools.server.cargo.autoreload

Automatically refresh project info via cargo metadata on Cargo.toml or .cargo/config.toml changes.

default:

true

Type: null or boolean

Default: null

Declared by:

plugins.rust-tools.server.cargo.cfgs

List of cfg options to enable with the given values.

default:

{
  debug_assertions = null;
  miri = null;
}

Type: null or (attribute set of anything)

Default: null

Declared by:

plugins.rust-tools.server.cargo.extraArgs

Extra arguments that are passed to every cargo invocation.

default:

[ ]

Type: null or (list of string)

Default: null

Declared by:

plugins.rust-tools.server.cargo.extraEnv

Extra environment variables that will be set when running cargo, rustc or other commands within the workspace. Useful for setting RUSTFLAGS.

default:

{ }

Type: null or (attribute set of anything)

Default: null

Declared by:

plugins.rust-tools.server.cargo.features

List of features to activate.

Set this to "all" to pass --all-features to cargo.

default:

[ ]

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

Default: null

Declared by:

plugins.rust-tools.server.cargo.noDefaultFeatures

Whether to pass --no-default-features to cargo.

default:

false

Type: null or boolean

Default: null

Declared by:

plugins.rust-tools.server.cargo.sysroot

Relative path to the sysroot, or “discover” to try to automatically find it via “rustc --print sysroot”.

Unsetting this disables sysroot loading.

This option does not take effect until rust-analyzer is restarted.

default:

"discover"

Type: null or null or string

Default: null

Declared by:

plugins.rust-tools.server.cargo.sysrootQueryMetadata

Whether to run cargo metadata on the sysroot library allowing rust-analyzer to analyze third-party dependencies of the standard libraries.

This will cause cargo to create a lockfile in your sysroot directory. rust-analyzer will attempt to clean up afterwards, but nevertheless requires the location to be writable to.

default:

false

Type: null or boolean

Default: null

Declared by:

plugins.rust-tools.server.cargo.sysrootSrc

Relative path to the sysroot library sources. If left unset, this will default to {cargo.sysroot}/lib/rustlib/src/rust/library.

This option does not take effect until rust-analyzer is restarted.

default:

null

Type: null or null or string

Default: null

Declared by:

plugins.rust-tools.server.cargo.target

Compilation target override (target triple).

default:

null

Type: null or null or string

Default: null

Declared by:

plugins.rust-tools.server.cargo.targetDir

Optional path to a rust-analyzer specific target directory. This prevents rust-analyzer’s cargo check and initial build-script and proc-macro building from locking the Cargo.lock at the expense of duplicating build artifacts.

Set to true to use a subdirectory of the existing target directory or set to a path relative to the workspace to use that path.

default:

null

Type: null or null or boolean or string

Default: null

Declared by: