.gitattributes lists *.fixed, *.pp, and *.mir as file extensions which should be treated as Rust source code. Do the same for VS Code and Zed. This only does syntax highlighting, which is appropriate, as MIR isn't really Rust code. At the same time, consistently order `rust-analyzer.linkedProjects` between editors. For some reason, Eglot didn't include library/Cargo.toml.
54 lines
1.5 KiB
JSON
54 lines
1.5 KiB
JSON
{
|
|
"lsp": {
|
|
"rust-analyzer": {
|
|
"initialization_options": {
|
|
"cargo": {
|
|
"buildScripts": {
|
|
"enable": true,
|
|
"invocationLocation": "root",
|
|
"invocationStrategy": "once",
|
|
"overrideCommand": ["python3", "x.py", "check", "--json-output"]
|
|
},
|
|
"extraEnv": {
|
|
"RUSTC_BOOTSTRAP": "1"
|
|
},
|
|
"sysrootSrc": "./library"
|
|
},
|
|
"check": {
|
|
"invocationLocation": "root",
|
|
"invocationStrategy": "once",
|
|
"overrideCommand": ["python3", "x.py", "check", "--json-output"]
|
|
},
|
|
"linkedProjects": [
|
|
"Cargo.toml",
|
|
"compiler/rustc_codegen_cranelift/Cargo.toml",
|
|
"compiler/rustc_codegen_gcc/Cargo.toml",
|
|
"library/Cargo.toml",
|
|
"src/bootstrap/Cargo.toml",
|
|
"src/tools/rust-analyzer/Cargo.toml"
|
|
],
|
|
"procMacro": {
|
|
"enable": true,
|
|
"server": "${workspaceFolder}/build/host/stage0/libexec/rust-analyzer-proc-macro-srv"
|
|
},
|
|
"rustc": {
|
|
"source": "./Cargo.toml"
|
|
},
|
|
"rustfmt": {
|
|
"overrideCommand": [
|
|
"${workspaceFolder}/build/host/rustfmt/bin/rustfmt",
|
|
"--edition=2021"
|
|
]
|
|
},
|
|
"server": {
|
|
"extraEnv": {
|
|
"RUSTUP_TOOLCHAIN": "nightly"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"file_types": {
|
|
"Rust": ["fixed", "pp", "mir"]
|
|
}
|
|
}
|