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

Pass --all-targets to cargo invocation.

Type: null or boolean

Default: null

Plugin default: true

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.cargo.autoreload

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

Type: null or boolean

Default: null

Plugin default: true

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.cargo.cfgs

List of cfg options to enable with the given values.

Type: null or (attribute set of anything)

Default: null

Plugin default:

{
  debug_assertions = null;
  miri = null;
}

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

Extra arguments that are passed to every cargo invocation.

Type: null or (list of string)

Default: null

Plugin default: [ ]

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

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

Type: null or (attribute set of anything)

Default: null

Plugin default: { }

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

List of features to activate.

Set this 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: [ ]

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

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

Type: null or boolean

Default: null

Plugin default: false

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.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.

Type: null or string

Default: null

Plugin default: "discover"

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.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.

Type: null or string

Default: null

Plugin default: null

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.cargo.target

Compilation target override (target triple).

Type: null or string

Default: null

Plugin default: null

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.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.

Type: null or boolean or string

Default: null

Plugin default: null