@@ -88,10 +88,18 @@ or build-script sources change and are saved.
8888Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
8989avoid checking unnecessary things.
9090--
91- [[rust-analyzer.cargo.cfgs]]rust-analyzer.cargo.cfgs (default: `{}` ) ::
91+ [[rust-analyzer.cargo.cfgs]]rust-analyzer.cargo.cfgs::
9292+
9393--
94+ Default:
95+ ----
96+ {
97+ "debug_assertions": null,
98+ "miri": null
99+ }
100+ ----
94101List of cfg options to enable with the given values.
102+
95103--
96104[[rust-analyzer.cargo.extraArgs]]rust-analyzer.cargo.extraArgs (default: `[]` )::
97105+
@@ -159,11 +167,6 @@ building from locking the `Cargo.lock` at the expense of duplicating build artif
159167Set to `true` to use a subdirectory of the existing target directory or
160168set to a path relative to the workspace to use that path.
161169--
162- [[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]` )::
163- +
164- --
165- Unsets the implicit `#[cfg(test)]` for the specified crates.
166- --
167170[[rust-analyzer.checkOnSave]]rust-analyzer.checkOnSave (default: `true` )::
168171+
169172--
@@ -321,46 +324,46 @@ Enables completions of private items and fields that are defined in the current
321324Default:
322325----
323326{
324- "Arc::new": {
325- "postfix": "arc",
326- "body": "Arc::new(${receiver})",
327- "requires": "std::sync::Arc",
328- "description": "Put the expression into an `Arc` ",
329- "scope": "expr"
330- },
331- "Rc::new": {
332- "postfix": "rc",
333- "body": "Rc::new(${receiver})",
334- "requires": "std::rc::Rc",
335- "description": "Put the expression into an `Rc` ",
336- "scope": "expr"
337- },
338- "Box::pin": {
339- "postfix": "pinbox",
340- "body": "Box::pin(${receiver})",
341- "requires": "std::boxed::Box",
342- "description": "Put the expression into a pinned `Box` ",
343- "scope": "expr"
344- },
345- "Ok": {
346- "postfix": "ok",
347- "body": "Ok(${receiver} )",
348- "description": "Wrap the expression in a `Result::Ok` ",
349- "scope": "expr"
350- },
351- "Err": {
352- "postfix": "err",
353- "body": "Err(${receiver} )",
354- "description": "Wrap the expression in a `Result::Err` ",
355- "scope": "expr"
356- },
357- "Some": {
358- "postfix": "some",
359- "body": "Some(${receiver} )",
360- "description": "Wrap the expression in an `Option::Some` ",
361- "scope": "expr"
362- }
363- }
327+ "Arc::new": {
328+ "postfix": "arc",
329+ "body": "Arc::new(${receiver})",
330+ "requires": "std::sync::Arc",
331+ "description": "Put the expression into an `Arc` ",
332+ "scope": "expr"
333+ },
334+ "Rc::new": {
335+ "postfix": "rc",
336+ "body": "Rc::new(${receiver})",
337+ "requires": "std::rc::Rc",
338+ "description": "Put the expression into an `Rc` ",
339+ "scope": "expr"
340+ },
341+ "Box::pin": {
342+ "postfix": "pinbox",
343+ "body": "Box::pin(${receiver})",
344+ "requires": "std::boxed::Box",
345+ "description": "Put the expression into a pinned `Box` ",
346+ "scope": "expr"
347+ },
348+ "Ok": {
349+ "postfix": "ok",
350+ "body": "Ok(${receiver} )",
351+ "description": "Wrap the expression in a `Result::Ok` ",
352+ "scope": "expr"
353+ },
354+ "Err": {
355+ "postfix": "err",
356+ "body": "Err(${receiver} )",
357+ "description": "Wrap the expression in a `Result::Err` ",
358+ "scope": "expr"
359+ },
360+ "Some": {
361+ "postfix": "some",
362+ "body": "Some(${receiver} )",
363+ "description": "Wrap the expression in an `Option::Some` ",
364+ "scope": "expr"
365+ }
366+ }
364367----
365368Custom completion snippets.
366369
@@ -775,7 +778,8 @@ Disable project auto-discovery in favor of explicitly specified set
775778of projects.
776779
777780Elements must be paths pointing to `Cargo.toml` ,
778- `rust-project.json` , or JSON objects in `rust-project.json` format.
781+ `rust-project.json` , `.rs` files (which will be treated as standalone files) or JSON
782+ objects in `rust-project.json` format.
779783--
780784[[rust-analyzer.lru.capacity]]rust-analyzer.lru.capacity (default: `null` )::
781785+
@@ -844,6 +848,24 @@ Command to be executed instead of 'cargo' for runnables.
844848--
845849Additional arguments to be passed to cargo for runnables such as
846850tests or binaries. For example, it may be `--release` .
851+ --
852+ [[rust-analyzer.runnables.extraTestBinaryArgs]]rust-analyzer.runnables.extraTestBinaryArgs::
853+ +
854+ --
855+ Default:
856+ ----
857+ [
858+ "-- show-output"
859+ ]
860+ ----
861+ Additional arguments to be passed through Cargo to launched tests, benchmarks, or
862+ doc-tests.
863+
864+ Unless the launched target uses a
865+ [custom test harness](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field),
866+ they will end up being interpreted as options to
867+ [`rustc` ’s built-in test harness (“libtest”)](https://doc.rust-lang.org/rustc/tests/index.html#cli-arguments).
868+
847869--
848870[[rust-analyzer.rustc.source]]rust-analyzer.rustc.source (default: `null` )::
849871+
0 commit comments