Skip to content

Commit 2206968

Browse files
committed
Use a separate dir for r-a builds consistently in helix config
1 parent 59cec72 commit 2206968

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/etc/rust_analyzer_helix.toml

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# This config uses a separate build directory for rust-analyzer,
2+
# so that r-a's checks don't block user `x` commands and vice-verse.
3+
# R-a's build directory is located in `build/rust-analyzer`.
4+
#
5+
# To build rustfmt and proc macro server for r-a run the following command:
6+
# ```
7+
# x b proc-macro-srv-cli rustfmt --stage 0 --build-dir build/rust-analyzer
8+
# ```
9+
110
[language-server.rust-analyzer.config]
211
linkedProjects = [
312
"Cargo.toml",
@@ -17,16 +26,18 @@ overrideCommand = [
1726
"x.py",
1827
"check",
1928
"--json-output",
29+
"--build-dir",
30+
"build/rust-analyzer",
2031
]
2132

2233
[language-server.rust-analyzer.config.rustfmt]
2334
overrideCommand = [
24-
"build-rust-analyzer/host/rustfmt/bin/rustfmt",
35+
"build/rust-analyzer/host/rustfmt/bin/rustfmt",
2536
"--edition=2021"
2637
]
2738

2839
[language-server.rust-analyzer.config.procMacro]
29-
server = "build-rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv"
40+
server = "build/rust-analyzer/host/stage0/libexec/rust-analyzer-proc-macro-srv"
3041
enable = true
3142

3243
[language-server.rust-analyzer.config.rustc]
@@ -47,4 +58,6 @@ overrideCommand = [
4758
"x.py",
4859
"check",
4960
"--json-output",
61+
"--build-dir",
62+
"build/rust-analyzer",
5063
]

0 commit comments

Comments
 (0)