4 ms·
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
by ibraheemdev 6y ago
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 https://github.com/rust-analyzer/rust-analyzer/issues/4224
- Fiahil 6y agoI got convinced to use rust-analyzer instead of RLS by a comment like yours on hacker news ! I can't thank you enough ! It's almost like Rust became a different -much pleasant- language after that !
- User23 6y agoHow 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.
- saghm 6y agoI use rust-analyzer with Emacs every day for work. There was a small amount of initial setup time (one or two bugs that had to be fixed with line or two in the init file), and since then, I haven't had to do anything; it's just worked fine.
- pimeys 6y agoI use it in Emacs every day since a few years. It mainly works, but I still haven't figured out the best way to set the right feature flag combinations if I work in a crate that uses them a lot. In these cases, if some code requires a feature to be enabled, analyzer does nothing because it compiles with the feature disabled. It's not bothering me that much that I'd find a solution, because I don't need the help of analyzer in crates that I maintain anymore...
- umanwizard 6y agoAnecdote: it worked fine for me in spacemacs. I switched from spacemacs to VSCode because the latter's vi emulation was better, not because r-a didn't work well.
- zxv 6y agoThe 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/ https://emacs-lsp.github.io/lsp-mode/ [1] https://github.com/joaotavora/eglot https://github.com/joaotavora/eglot
- pdimitar 6y agoI use it with Spacemacs for 6+ months now and it's only getting better with time. It's 99% reliable.
- stefan_ 6y agoIf you want to use the rust-analyzer LSP, you might want to switch to the rust-analyzer VSCode extension instead of the Rust one. There is a reason the "official" one doesn't use it yet and having a flaky autocomplete is the worst.