From 69bd84f8fbe8481b8cd444fccc4a743b2d59d60c Mon Sep 17 00:00:00 2001 From: jyn Date: Sat, 29 Aug 2026 07:59:23 +0200 Subject: [PATCH] fix outdated docs about what RA config `x setup` generates --- src/building/suggested.md | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/building/suggested.md b/src/building/suggested.md index 0b0cabaca6..01869dfdc3 100644 --- a/src/building/suggested.md +++ b/src/building/suggested.md @@ -90,11 +90,13 @@ Running `./x setup editor` will prompt you to create a project-local LSP config file for one of the supported editors. You can also create the config file as a step of running `./x setup`. -### Using a separate build directory for rust-analyzer +### Using a shared build directory for rust-analyzer -By default, when rust-analyzer runs a check or format command, it will share -the same build directory as manual command-line builds. -This can be inconvenient for two reasons: +By default, when rust-analyzer runs a bootstrap command, +it will use a separate build directory from manual command-line builds. +You can override this your generated LSP config file if you want to save disk space. + +However, this is not recommended: - Each build will lock the build directory and force the other to wait, so it becomes impossible to run command-line builds while rust-analyzer is running commands in the background. @@ -102,18 +104,6 @@ This can be inconvenient for two reasons: artifacts due to conflicting compiler flags or other settings, forcing additional rebuilds in some cases. -To avoid these problems: -- Add `--build-dir=build-rust-analyzer` to all of the custom `x` commands in - your editor's rust-analyzer configuration. - (Feel free to choose a different directory name if desired.) -- Modify the `rust-analyzer.rustfmt.overrideCommand` setting so that it points - to the copy of `rustfmt` in that other build directory. -- Modify the `rust-analyzer.procMacro.server` setting so that it points to the - copy of `rust-analyzer-proc-macro-srv` in that other build directory. - -Using separate build directories for command-line builds and rust-analyzer -requires extra disk space. - ### Visual Studio Code Selecting `vscode` in `./x setup editor` will prompt you to create a