Our great sponsors
-
rust-analyzer
Discontinued A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer] (by rust-analyzer)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
intellij-lsp-server
Discontinued Exposes IntelliJ IDEA features through the Language Server Protocol.
-
chalk
An implementation and definition of the Rust trait system using a PROLOG-like logic solver (by rust-lang)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
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 soon to be the "official" rust LSP [0].
0: https://github.com/rust-analyzer/rust-analyzer/issues/4224
It looks like this is blocked upstream by the language server protocol not passing the current selection for hover requests [0].
0: https://github.com/microsoft/language-server-protocol/issues...
The LSP means every single language server has to reinvent the wheel again and again.
It’d have been much more useful to build bindings for IDEA plugins so they could be integrated into arbitrary editors, especially as the IDEA plugins for most languages even after several years of LSP development are still superior.
All in all it’s like the whole JVM vs. WASM, Java vs Electron story again, with someone deciding to reinvent the wheel but worse.
There’s even bindings like https://github.com/Ruin0x11/intellij-lsp-server or https://plugins.jetbrains.com/plugin/10209-lsp-support to glue it all back together.
It’d have been much simpler to reuse an existing ecosystem from the start.
IDEA has a language-server plugin: https://github.com/gtache/intellij-lsp
RA uses chalk [1], which is a trait solver rewrite for rustc. You can already use it on nightly with a feature flag.
So RA can get close to the trait resolution of the compiler, which is probably the most challenging part. I haven't used Intellij in a while, but I doubt they can ever get close with their custom implementation.
Take a look at neovim 0.5 beta [0]. It has native support for LSP [1], and it's on par with other editors.
>And every single language server has to reimplement all these from scratch.
This is mostly true about IDEA as well. Take a look at the extractFunction implementation from IntelliJ Rust:
https://github.com/intellij-rust/intellij-rust/tree/6b2c4dfa...
It is based on a generic `RefactoringActionHandler`, and not on the specialized `ExtractFunctionActionHandler`.
There's relatively little code sharing you can do for high-level things in IDEs.
The use interface sharing is another thing, and that is exactly what LSP achieves: it standardizes common actions across many languages.