From 7a78c44ba605acb409fcd92ba133310f8b2363f5 Mon Sep 17 00:00:00 2001 From: Herrtian <70463940+Herrtian@users.noreply.github.com> Date: Tue, 7 Jul 2026 14:15:46 +0200 Subject: [PATCH] Link to editor rust-analyzer configs --- src/building/suggested.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/building/suggested.md b/src/building/suggested.md index bc4779db9..5a411eae8 100644 --- a/src/building/suggested.md +++ b/src/building/suggested.md @@ -102,14 +102,16 @@ 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. +To avoid these problems, use the editor configuration generated by +`./x setup editor`. These configuration files already set up the +rust-analyzer build directory and the matching `rustfmt` and proc-macro server +paths for each supported editor. + +If you maintain a custom editor configuration, copy the relevant settings from +the files in `src/etc`, such as [`src/etc/rust_analyzer_settings.json`], +[`src/etc/rust_analyzer_eglot.el`], [`src/etc/rust_analyzer_helix.toml`], or +[`src/etc/rust_analyzer_zed.json`], rather than duplicating them from this +guide. Using separate build directories for command-line builds and rust-analyzer requires extra disk space.