Skip to content

Commit 07ef231

Browse files
authored
Add note to readme about r-a cargo.targetDir (#8866)
The collapsed bit may be unnecessary but it may also be helpful. Would be nice to get Vim and NeoVim and VS Code in there. <img width="664" height="343" alt="image" src="https://github.com/user-attachments/assets/63bda791-4060-47df-be4e-913610108e0c" />
1 parent cb7b856 commit 07ef231

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,21 @@ NOTE: This section assumes you're already familiar with the prerequisites and en
8181
* Use `cargo check` when you just want to know if your code compiles. It's _much_ faster than `cargo build` or `cargo nextest run`.
8282
* When using Cargo's check/build/test/clippy commands, you can use the `-p PACKAGE` flag to only operate on a specific package. This often saves a lot of time for incremental builds.
8383
* When using Cargo's check/build/clippy commands, use `--all-targets` to make sure you're checking or building the test code, too.
84+
* Use https://rust-analyzer.github.io/book/configuration#cargo.targetDir[`cargo.targetDir`] to give rust-analyzer a target directory other than `./target` so it doesn't block you from running commands in the terminal. This uses extra disk space.
85+
86+
.How to set `cargo.targetDir` in various editors
87+
[%collapsible]
88+
====
89+
90+
[source, toml]
91+
.Helix
92+
----
93+
[language-server.rust-analyzer.config]
94+
cargo.targetDir = true
95+
----
96+
97+
====
98+
8499

85100
These are explained a bit more below, along with some common pitfalls.
86101

0 commit comments

Comments
 (0)