For those who don't know, rust-analyzer is an implementation of the Language Server Protocol for the Rust programming language, written in Rust. It assists you while you program, for example finding usages of a piece of code or going to the definition of a function. Basically a Rust IDE that you can plug into any text editor (in theory).

It is also worth noting that rust-analyzer is the successor to RLS. If anyone is still using the RLS (most editor plugins can be configured to use either), they should switch to rust-analyzer. It is much much better in almost every possible way, and soon to be made the "official" rust LSP [0].

0: https://github.com/rust-analyzer/rust-analyzer/issues/4224

How is the Emacs support for this LSP implementation? Does it actually work comparably well to VS Code, or is it going to be like trying to use Emacs as a Java IDE back in the day: fighting your tooling constantly and getting little help from it.

The emacs support is great. I use emacs 'racer' and 'lsp' packages full time for development.

There are two popular emacs packages for rust-analyzer: lsp[0] and eglot[1]. lsp (language server protocol) package is the default for racer. Eglot has far more features and is correspondingly resource hungry.

Detailed type information has a super helpful impact on my ability to review Rust code in general. I find reviewing rust code much more productive when I can see what owns a variable, how long it lives, and how it's being used (immutable vs mutable). So yea, lsp or eglot. Super helpful.

[0] https://emacs-lsp.github.io/lsp-mode/ [1] https://github.com/joaotavora/eglot