add zed editor config

This commit is contained in:
Nia Espera 2025-09-03 01:56:03 +02:00
parent 1feabac1db
commit 4daea276ee
No known key found for this signature in database
GPG key ID: 11B180DBC90B5AC4
2 changed files with 47 additions and 0 deletions

View file

@ -255,6 +255,12 @@ when installing the Miri toolchain. Alternatively, set the `RUSTUP_TOOLCHAIN` en
[`etc/rust_analyzer_helix.toml`]: https://github.com/rust-lang/miri/blob/master/etc/rust_analyzer_helix.toml
### Zed
Copy [`etc/rust_analyzer_zed.json`] to `.zed/settings.json` in the project root directory.
[`etc/rust_analyzer_zed.json`]: https://github.com/rust-lang/miri/blob/master/etc/rust_analyzer_zed.json
### Advanced configuration
If you are building Miri with a locally built rustc, set

View file

@ -0,0 +1,41 @@
{
"lsp": {
"rust-analyzer": {
"initialization_options": {
"rustc": {
"source": "discover"
},
"linkedProjects": [
"./Cargo.toml",
"./cargo-miri/Cargo.toml",
"./genmc-sys/Cargo.toml",
"./miri-script/Cargo.toml"
],
"check": {
"invocationStrategy": "once",
"overrideCommand": [
"./miri",
"clippy", // make this `check` when working with a locally built rustc
"--message-format=json"
]
},
"cargo": {
"extraEnv": {
"MIRI_AUTO_OPS": "no",
"MIRI_IN_RA": "1"
},
// Contrary to what the name suggests, this also affects proc macros.
"buildScripts": {
"invocationStrategy": "once",
"overrideCommand": [
"./miri",
"check",
"--no-default-features",
"--message-format=json"
]
}
}
}
}
}
}