Skip to content

Commit 3015ce1

Browse files
authored
Merge pull request rust-lang#4559 from nia-e/zed-config
Add Zed editor config
2 parents 5f3197f + 4daea27 commit 3015ce1

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

src/tools/miri/CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ when installing the Miri toolchain. Alternatively, set the `RUSTUP_TOOLCHAIN` en
255255

256256
[`etc/rust_analyzer_helix.toml`]: https://github.com/rust-lang/miri/blob/master/etc/rust_analyzer_helix.toml
257257

258+
### Zed
259+
260+
Copy [`etc/rust_analyzer_zed.json`] to `.zed/settings.json` in the project root directory.
261+
262+
[`etc/rust_analyzer_zed.json`]: https://github.com/rust-lang/miri/blob/master/etc/rust_analyzer_zed.json
263+
258264
### Advanced configuration
259265

260266
If you are building Miri with a locally built rustc, set
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"lsp": {
3+
"rust-analyzer": {
4+
"initialization_options": {
5+
"rustc": {
6+
"source": "discover"
7+
},
8+
"linkedProjects": [
9+
"./Cargo.toml",
10+
"./cargo-miri/Cargo.toml",
11+
"./genmc-sys/Cargo.toml",
12+
"./miri-script/Cargo.toml"
13+
],
14+
"check": {
15+
"invocationStrategy": "once",
16+
"overrideCommand": [
17+
"./miri",
18+
"clippy", // make this `check` when working with a locally built rustc
19+
"--message-format=json"
20+
]
21+
},
22+
"cargo": {
23+
"extraEnv": {
24+
"MIRI_AUTO_OPS": "no",
25+
"MIRI_IN_RA": "1"
26+
},
27+
// Contrary to what the name suggests, this also affects proc macros.
28+
"buildScripts": {
29+
"invocationStrategy": "once",
30+
"overrideCommand": [
31+
"./miri",
32+
"check",
33+
"--no-default-features",
34+
"--message-format=json"
35+
]
36+
}
37+
}
38+
}
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)