@@ -45,22 +45,14 @@ Automatically refresh project info via `cargo metadata` on
4545--
4646Run build scripts (`build.rs` ) for more precise code analysis.
4747--
48- [[rust-analyzer.cargo.buildScripts.invocationLocation]]rust-analyzer.cargo.buildScripts.invocationLocation (default: `"workspace"` )::
49- +
50- --
51- Specifies the working directory for running build scripts.
52- - "workspace": run build scripts for a workspace in the workspace's root directory.
53- This is incompatible with `#rust-analyzer.cargo.buildScripts.invocationStrategy#` set to `once` .
54- - "root": run build scripts in the project's root directory.
55- This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
56- is set.
57- --
5848[[rust-analyzer.cargo.buildScripts.invocationStrategy]]rust-analyzer.cargo.buildScripts.invocationStrategy (default: `"per_workspace"` )::
5949+
6050--
6151Specifies the invocation strategy to use when running the build scripts command.
62- If `per_workspace` is set, the command will be executed for each workspace.
63- If `once` is set, the command will be executed once.
52+ If `per_workspace` is set, the command will be executed for each Rust workspace with the
53+ workspace as the working directory.
54+ If `once` is set, the command will be executed once with the opened project as the
55+ working directory.
6456This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
6557is set.
6658--
@@ -75,8 +67,7 @@ option.
7567If there are multiple linked projects/workspaces, this command is invoked for
7668each of them, with the working directory being the workspace root
7769(i.e., the folder containing the `Cargo.toml` ). This can be overwritten
78- by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#` and
79- `#rust-analyzer.cargo.buildScripts.invocationLocation#` .
70+ by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#` .
8071
8172By default, a cargo invocation will be constructed for the configured
8273targets and features, with the following base command line:
@@ -209,16 +200,6 @@ List of `cargo check` (or other command specified in `check.command`) diagnostic
209200
210201For example for `cargo check` : `dead_code` , `unused_imports` , `unused_variables` ,...
211202--
212- [[rust-analyzer.check.invocationLocation]]rust-analyzer.check.invocationLocation (default: `"workspace"` )::
213- +
214- --
215- Specifies the working directory for running checks.
216- - "workspace": run checks for workspaces in the corresponding workspaces' root directories.
217- This falls back to "root" if `#rust-analyzer.check.invocationStrategy#` is set to `once` .
218- - "root": run checks in the project's root directory.
219- This config only has an effect when `#rust-analyzer.check.overrideCommand#`
220- is set.
221- --
222203[[rust-analyzer.check.invocationStrategy]]rust-analyzer.check.invocationStrategy (default: `"per_workspace"` )::
223204+
224205--
@@ -250,8 +231,7 @@ Cargo, you might also want to change
250231If there are multiple linked projects/workspaces, this command is invoked for
251232each of them, with the working directory being the workspace root
252233(i.e., the folder containing the `Cargo.toml` ). This can be overwritten
253- by changing `#rust-analyzer.check.invocationStrategy#` and
254- `#rust-analyzer.check.invocationLocation#` .
234+ by changing `#rust-analyzer.check.invocationStrategy#` .
255235
256236If `$saved_file` is part of the command, rust-analyzer will pass
257237the absolute path of the saved file to the provided command. This is
0 commit comments