Skip to content

Commit 277ab5f

Browse files
committed
make rust-analyzer settings use dedicated directory
This avoids rust-analyzer having to wait for a build lock due to ./x running other commands (and the other way around). This was inspired by Helix settings.
1 parent 852f15c commit 277ab5f

File tree

4 files changed

+31
-6
lines changed

4 files changed

+31
-6
lines changed

src/bootstrap/src/core/build_steps/setup.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ Select which editor you would like to set up [default: None]: ";
586586
"b5dd299b93dca3ceeb9b335f929293cb3d4bf4977866fbe7ceeac2a8a9f99088",
587587
"631c837b0e98ae35fd48b0e5f743b1ca60adadf2d0a2b23566ba25df372cf1a9",
588588
"080955765db84bb6cbf178879f489c4e2369397626a6ecb3debedb94a9d0b3ce",
589+
"be95b948c04bc0a2c6f4852a7cf52fdb5bedb1affc208942b8ef813a741dda4c",
589590
],
590591
EditorKind::Helix => &[
591592
"2d3069b8cf1b977e5d4023965eb6199597755e6c96c185ed5f2854f98b83d233",
@@ -607,12 +608,14 @@ Select which editor you would like to set up [default: None]: ";
607608
"e53e9129ca5ee5dcbd6ec8b68c2d87376474eb154992deba3c6d9ab1703e0717",
608609
"f954316090936c7e590c253ca9d524008375882fa13c5b41d7e2547a896ff893",
609610
"701b73751efd7abd6487f2c79348dab698af7ac4427b79fa3d2087c867144b12",
611+
"d1bc5c13ce84bba368aeb86a1c6c91e11c9050f3fa646ec970041f1bfa0764ee",
610612
],
611613
EditorKind::Zed => &[
612614
"bbce727c269d1bd0c98afef4d612eb4ce27aea3c3a8968c5f10b31affbc40b6c",
613615
"a5380cf5dd9328731aecc5dfb240d16dac46ed272126b9728006151ef42f5909",
614616
"2e96bf0d443852b12f016c8fc9840ab3d0a2b4fe0b0fb3a157e8d74d5e7e0e26",
615617
"4fadd4c87389a601a27db0d3d74a142fa3a2e656ae78982e934dbe24bee32ad6",
618+
"eadff223a5cf26a64989ebfcc7a82106f94bb921237b38c78a6aa5129f1e3edc",
616619
],
617620
}
618621
}

src/etc/rust_analyzer_eglot.el

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
:overrideCommand ["python3"
77
"x.py"
88
"check"
9-
"--json-output"])
9+
"--json-output"
10+
"--build-dir"
11+
"build/rust-analyzer"])
1012
:linkedProjects ["Cargo.toml"
1113
"compiler/rustc_codegen_cranelift/Cargo.toml"
1214
"compiler/rustc_codegen_gcc/Cargo.toml"
@@ -23,7 +25,9 @@
2325
:overrideCommand ["python3"
2426
"x.py"
2527
"check"
26-
"--json-output"])
28+
"--json-output"
29+
"--build-dir"
30+
"build/rust-analyzer"])
2731
:sysrootSrc "./library"
2832
:extraEnv (:RUSTC_BOOTSTRAP "1"))
2933
:rustc ( :source "./Cargo.toml" )))))))

src/etc/rust_analyzer_settings.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"python3",
66
"x.py",
77
"check",
8-
"--json-output"
8+
"--json-output",
9+
"--build-dir",
10+
"build/rust-analyzer"
911
],
1012
"rust-analyzer.linkedProjects": [
1113
"Cargo.toml",
@@ -27,7 +29,9 @@
2729
"python3",
2830
"x.py",
2931
"check",
30-
"--json-output"
32+
"--json-output",
33+
"--build-dir",
34+
"build/rust-analyzer"
3135
],
3236
"rust-analyzer.cargo.sysrootSrc": "./library",
3337
"rust-analyzer.rustc.source": "./Cargo.toml",

src/etc/rust_analyzer_zed.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77
"enable": true,
88
"invocationLocation": "root",
99
"invocationStrategy": "once",
10-
"overrideCommand": ["python3", "x.py", "check", "--json-output"]
10+
"overrideCommand": [
11+
"python3",
12+
"x.py",
13+
"check",
14+
"--json-output",
15+
"--build-dir",
16+
"build/rust-analyzer"
17+
]
1118
},
1219
"extraEnv": {
1320
"RUSTC_BOOTSTRAP": "1"
@@ -17,7 +24,14 @@
1724
"check": {
1825
"invocationLocation": "root",
1926
"invocationStrategy": "once",
20-
"overrideCommand": ["python3", "x.py", "check", "--json-output"]
27+
"overrideCommand": [
28+
"python3",
29+
"x.py",
30+
"check",
31+
"--json-output",
32+
"--build-dir",
33+
"build/rust-analyzer"
34+
]
2135
},
2236
"linkedProjects": [
2337
"Cargo.toml",

0 commit comments

Comments
 (0)