plugins.lsp.servers.rust_analyzer.settings.cargo.allTargets

Pass --all-targets to cargo invocation.

Type: null or boolean

Default: null

Plugin default: true

Declared by:

plugins.lsp.servers.rust_analyzer.settings.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

Declared by:

plugins.lsp.servers.rust_analyzer.settings.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;
}

Declared by:

plugins.lsp.servers.rust_analyzer.settings.cargo.extraArgs

Extra arguments that are passed to every cargo invocation.

Type: null or (list of string)

Default: null

Plugin default: [ ]

Declared by:

plugins.lsp.servers.rust_analyzer.settings.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: { }

Declared by:

plugins.lsp.servers.rust_analyzer.settings.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: [ ]

Declared by:

plugins.lsp.servers.rust_analyzer.settings.cargo.noDefaultFeatures

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

Type: null or boolean

Default: null

Plugin default: false

Declared by:

plugins.lsp.servers.rust_analyzer.settings.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"

Declared by:

plugins.lsp.servers.rust_analyzer.settings.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

Declared by:

plugins.lsp.servers.rust_analyzer.settings.cargo.target

Compilation target override (target triple).

Type: null or string

Default: null

Plugin default: null

Declared by:

plugins.lsp.servers.rust_analyzer.settings.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

Declared by: