New LSP Client Implementation

I’ve made a new LSP client implementation, available at LSP Client for JetBrains IDEs | Joachim Ansorg, Software Developer.

Documentation is available at LSP Client For JetBrains IDEs | Joachim Ansorg, Software Developer.
A comparison with other clients is available at Comparison of LSP Implementations for JetBrains IDEs | Joachim Ansorg, Software Developer.

This has been in development for a long time, originating from my Swift Support plugin’s LSP support.

It’s still an early version, but most LSP features should be supported well and be integrated well into the IDE.

Let me know if you have questions or if you’d like to try it.
Thanks!

3 Likes

LSP4IJ has a problem in which it cannot coexist with the native client due to shared dependencies. Does the same happen to yours?

I haven’t tested a setup with both my LSP client library and the JetBrains setup, yet.

A similar problem would happen if several plugins use the LSP client library, they must not share the same classes.
To fix this, I’ve made a Gradle plugin to relocate the library when a plugin using the library is built: GitHub - jansorg/lsp-gradle-plugin: Gradle plugin to help relocating the LSP library at https://www.j-a.dev/lsp-dap for JetBrains plugins using it

If I’m not mistaken, then the LSP4J dependency would have to be relocated, too.
Adding this to my Gradle plugin should be possible. I’ll test the setup when I find some time…
Alternatively, I could relocate and bundle LSP4J into my JARs, but that’s probably the less preferred solution.

1 Like

@insyncwithfoo I tested this with a plugin with both my LSP and JetBrains LSP active at the same time. With 2024.2 and 2025.1 I’m not seeing this exception.
It’s either not happening with these major versions or it’s not showing because classes bundled with a plugin are preferred.
Please note that I’m only supporting 2024.2+

But different versions of the same library all available at runtime at the same time is often creating problems. A fix would be to shadow/relocate LSP4J in the plugin using my library or into LSP4IJ if that client is used.

1 Like

Great news! I’ll test it soon!

See also Update on LSP and Template Language APIs in PyCharm

Thanks, I appreciate it!