packages/omo-codex/plugin/skills/lsp-setup/references/rust/README.md
rust — rust-analyzer.rsrustup component add rust-analyzerrustup component add rust-analyzer (or brew install rust-analyzer)rustup component add rust-analyzerrustup component add rust-analyzerThe rustup component is the recommended path — it stays pinned to your toolchain.
rust-analyzer also needs the rust-src component to index the standard library
(rustup component add rust-src).
Confirm it resolves:
command -v rust-analyzer
Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in .codex/lsp-client.json (Codex) AND .opencode/lsp.json (OpenCode/omo):
{ "lsp": { "rust": { "priority": 100 } } }
For builtin ids in a PROJECT config, command is supplied automatically — only set priority/initialization/extensions/disabled/env. A fully custom (non-builtin) server with its own command must go in the USER config (~/.codex/lsp-client.json).
None commonly required. To switch the check command to clippy:
{ "lsp": { "rust": { "initialization": { "check": { "command": "clippy" } } } } }
None — rust-analyzer is the official and sole Rust language server.
PATH: rust-analyzer must be on PATH; reopen shell after install. The rustup shim lives in ~/.cargo/bin.
Exits while loading rust-src: if rust-analyzer crashes during stdlib indexing, reinstall the source component:
rustup component remove rust-src && rustup component add rust-src
No proc-macro / build script support: ensure the project builds with cargo check; rust-analyzer reuses the same toolchain.
bun ../../scripts/verify-lsp.ts path/to/file.rs