rust-analyzer
A Rust compiler front-end for IDEs
Official Rust language server. Gives any LSP-compatible editor go-to-definition, completion, inline errors, rename refactoring, and clippy hints.
Rust-analyzer is a language server for the Rust programming language, providing smart editor features to any code editor that supports the Language Server Protocol (LSP) — a standard interface that lets editors communicate with language-specific tools. Editors like VS Code, Vim, Emacs, and Zed all support LSP.
A language server sits in the background while you write code, continuously analyzing it to power features like go-to-definition (jump to where a function or type is defined), find-all-references (see everywhere a symbol is used), code completion (suggestions as you type), refactoring tools (safely rename or restructure code), and inline diagnostics (errors and warnings shown as you type rather than only on compile). Rust-analyzer also integrates with rustfmt for automatic code formatting and with clippy (Rust's linter) for additional code quality hints.
Internally, rust-analyzer is structured as a set of libraries for analyzing Rust code, designed to handle the incremental, interactive nature of IDE work where you need fast responses to partial or incomplete code changes.
You would use rust-analyzer if you write Rust code and want a rich editing experience in your preferred code editor. It is the official language server for Rust, maintained under the rust-lang organization, and is licensed under MIT and Apache 2.0.
Where it fits
- Get IDE-quality Rust editing in VS Code Vim or Emacs
- Run inline clippy lints and rustfmt formatting on save
- Power a custom editor with Rust code intelligence over LSP