commit
3015ce19c7
2 changed files with 47 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
41
src/tools/miri/etc/rust_analyzer_zed.json
Normal file
41
src/tools/miri/etc/rust_analyzer_zed.json
Normal 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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue