Zed's bundled rust-analyzer calls `cargo metadata --lockfile-path`, which is still gated behind `-Z unstable-options` on cargo 1.95.0 (both stable and the esp Xtensa fork). Workspaces fail to load with the bundled binary. Point lsp.rust-analyzer.binary.path at the rustup-managed rust-analyzer (version-locked to cargo 1.95 stable, no unstable flags). Also set cargo.target = xtensa-esp32s3-espidf with allTargets=false so RA doesn't try to check the crate for the host target — esp-idf-sys can't build for macOS.
48 lines
1.1 KiB
JSON
48 lines
1.1 KiB
JSON
{
|
|
"lsp": {
|
|
"rust-analyzer": {
|
|
"binary": {
|
|
"path": "/Users/julien/.rustup/toolchains/stable-aarch64-apple-darwin/bin/rust-analyzer",
|
|
"arguments": []
|
|
},
|
|
"initialization_options": {
|
|
"cargo": {
|
|
"target": "xtensa-esp32s3-espidf",
|
|
"allTargets": false
|
|
},
|
|
"check": {
|
|
"allTargets": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"languages": {
|
|
"JavaScript": {
|
|
"formatter": { "language_server": { "name": "oxc" } },
|
|
"format_on_save": "on"
|
|
},
|
|
"TypeScript": {
|
|
"formatter": { "language_server": { "name": "oxc" } },
|
|
"format_on_save": "on"
|
|
},
|
|
"TSX": {
|
|
"formatter": { "language_server": { "name": "oxc" } },
|
|
"format_on_save": "on"
|
|
},
|
|
"JSON": {
|
|
"formatter": { "language_server": { "name": "oxc" } },
|
|
"format_on_save": "on"
|
|
},
|
|
"Markdown": {
|
|
"language_servers": ["md-path-lsp"],
|
|
"formatter": {
|
|
"external": {
|
|
"command": "node_modules/.bin/oxfmt",
|
|
"arguments": ["--stdin-filepath", "{buffer_path}"]
|
|
}
|
|
},
|
|
"format_on_save": "on"
|
|
}
|
|
}
|
|
}
|