[id="lsp-rust-vars"]
==== `lsp-rust` settings

[id="lsp-rust-library-directories"]
- `lsp-rust-library-directories`
____
Default value: `pass:[("~/.cargo/registry/src" "~/.rustup/toolchains")
]`

List of directories which will be considered to be libraries.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-sysroot"]
- `lsp-rust-sysroot`
____
Default value: `pass:[nil]`

If non-nil, use the given path as the sysroot for all rustc invocations instead of trying to detect the sysroot automatically.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-target"]
- `lsp-rust-target`
____
Default value: `pass:[nil]`

If non-nil, use the given target triple for all rustc invocations.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-rustflags"]
- `lsp-rust-rustflags`
____
Default value: `pass:[nil]`

Flags added to RUSTFLAGS.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-clear-env-rust-log"]
- `lsp-rust-clear-env-rust-log`
____
Default value: `pass:[t]`

Clear the RUST_LOG environment variable before running rustc
or cargo.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-build-lib"]
- `lsp-rust-build-lib`
____
Default value: `pass:[nil]`

If non-nil, checks the project as if you passed the ‘--lib’ argument to cargo.
 Mutually exclusive with, and preferred over, ‘lsp-rust-build-bin’. (Unstable)

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-build-bin"]
- `lsp-rust-build-bin`
____
Default value: `pass:[nil]`

If non-nil, checks the project as if you passed `-- bin <build_bin>` argument to cargo.
 Mutually exclusive with ‘lsp-rust-build-lib’. (Unstable)

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-cfg-test"]
- `lsp-rust-cfg-test`
____
Default value: `pass:[nil]`

If non-nil, checks the project as if you were running ‘cargo test’ rather than cargo build. I.e., compiles (but does not run) test code.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-unstable-features"]
- `lsp-rust-unstable-features`
____
Default value: `pass:[nil]`

Enable unstable features.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-wait-to-build"]
- `lsp-rust-wait-to-build`
____
Default value: `pass:[nil]`

Time in milliseconds between receiving a change notification
and starting build. If not specified, automatically inferred by
the latest build duration.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-show-warnings"]
- `lsp-rust-show-warnings`
____
Default value: `pass:[t]`

Show warnings.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-use-crate-blacklist"]
- `lsp-rust-use-crate-blacklist`
____
Default value: `pass:[t]`

Don’t index crates on the crate blacklist.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-build-on-save"]
- `lsp-rust-build-on-save`
____
Default value: `pass:[nil]`

Only index the project when a file is saved and not on
change.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-features"]
- `lsp-rust-features`
____
Default value: `pass:[[]
]`

A list of Cargo features to enable.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-all-features"]
- `lsp-rust-all-features`
____
Default value: `pass:[nil]`

Enable all Cargo features.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-no-default-features"]
- `lsp-rust-no-default-features`
____
Default value: `pass:[nil]`

Do not enable default Cargo features.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-racer-completion"]
- `lsp-rust-racer-completion`
____
Default value: `pass:[t]`

Enables code completion using racer.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-clippy-preference"]
- `lsp-rust-clippy-preference`
____
Default value: `pass:["opt-in"]`

Controls eagerness of clippy diagnostics when available. Valid
  values are (case-insensitive):
 - "off": Disable clippy
  lints.
 - "opt-in": Clippy lints are shown when crates
  specify ‘#![warn(clippy)]‘.
 - "on": Clippy lints enabled
  for all crates in workspace.
You need to install clippy via
  rustup if you haven’t already.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-jobs"]
- `lsp-rust-jobs`
____
Default value: `pass:[nil]`

Number of Cargo jobs to be run in parallel.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-all-targets"]
- `lsp-rust-all-targets`
____
Default value: `pass:[t]`

Checks the project as if you were running cargo check
--all-targets (I.e., check all targets and integration tests
too).

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-target-dir"]
- `lsp-rust-target-dir`
____
Default value: `pass:[nil]`

When specified, it places the generated analysis files at the
specified target directory. By default it is placed target/rls
directory.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-rustfmt-path"]
- `lsp-rust-rustfmt-path`
____
Default value: `pass:[nil]`

When specified, RLS will use the Rustfmt pointed at the path
instead of the bundled one

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-build-command"]
- `lsp-rust-build-command`
____
Default value: `pass:[nil]`

EXPERIMENTAL (requires ‘unstable_features‘)
If set, executes
a given program responsible for rebuilding save-analysis to be
loaded by the RLS. The program given should output a list of
resulting .json files on stdout. 
Implies ‘rust.build_on_save‘:
true.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-full-docs"]
- `lsp-rust-full-docs`
____
Default value: `pass:[nil]`

Instructs cargo to enable full documentation extraction during
save-analysis while building the crate.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-show-hover-context"]
- `lsp-rust-show-hover-context`
____
Default value: `pass:[t]`

Show additional context in hover tooltips when available. This
is often the type local variable declaration.

NOTE: Introduced in `lsp-mode` 6.1

____
[id="lsp-rust-rls-server-command"]
- `lsp-rust-rls-server-command`
____
Default value: `pass:[("rls")
]`

Command to start RLS.

NOTE: Introduced in `lsp-mode` 6.1

____
