LSP4IntelliJ is a client library that brings Language Server Protocol (LSP) support to IntelliJ IDEA and other JetBrains IDEs.
Designed for plugin developers, it streamlines LSP integration and supports language-specific extensions over the JSON-RPC protocol.
- Compatibility Matrix
- Projects Powered by LSP4IntelliJ
- Quick Start
- Developer Guide
- Features
- License
- Contributors
- Inspiration
- Useful Links
The table below groups released lsp4intellij artifacts by the IntelliJ IDEA version range they are known to be compatible with and the LSP specification version they support (derived from the bundled org.eclipse.lsp4j runtime). Because lsp4intellij is consumed as a library, your plugin's own plugin.xml ultimately controls runtime compatibility — but picking a library version whose range overlaps your plugin's target avoids API surface mismatches.
| LSP4IntelliJ | Compatible IDEA versions | Supported LSP spec |
|---|---|---|
0.95.1 – 0.96.2 |
2021.1 – 2024.2 | 3.17 |
0.95.0 |
2021.1 – 2024.2 | 3.16 |
0.94.0 – 0.94.2 |
2017.3 – 2020.3 | 3.14 |
0.1.0 – 0.92.1 |
2017.3 – 2020.3 | 3.13 |
Note: Ranges reflect the IDEA versions covered while each release line was actively maintained. No upper bound (
untilBuild) is enforced in the artifact itself, so newer IDEs are not artificially blocked — but compatibility outside the listed range is unverified and depends on whether the IntelliJ Platform APIs used by the library remain available in the target IDE.
Here are some open-source projects that use lsp4intellij to integrate their language servers. Feel free to open a PR to add or remove an entry.
- 1C:Enterprise BSL Language Support
- AWS Smithy IntelliJ
- Ballerina IntelliJ Plugin
- Cadence for IntelliJ Platform
- Chester IntelliJ Plugin
- CSL IntelliJ Extension
- DiveKit Language Plugin
- EO IntelliJ LSP Plugin
- IntelliJ Jsonnet
- IntelliJ V
- Marko.js IntelliJ Plugin
- nimtellij
- Robot Framework LSP (IntelliJ client)
- Seedwing Enforcer IntelliJ
- Spring Tools for IDEA
- Valkyrie IntelliJ
- WDL IDE
- Yarn Spinner JetBrains Plugin
- Yggdrasil IntelliJ
The minimum integration is three pieces: add the dependency, register a language server from a startup activity, and wire that activity into plugin.xml. Replace the command and file extension with your own.
build.gradle — see JitPack for Maven and SBT snippets.
implementation 'com.github.ballerina-platform:lsp4intellij:<version>'Startup activity
public class MyLspStartup implements ProjectActivity {
@Nullable
@Override
public Object execute(@NotNull Project project, @NotNull Continuation<? super Unit> continuation) {
IntellijLanguageClient.addServerDefinition(
new RawCommandServerDefinition("mylang", new String[]{"path/to/language-server"}));
return Unit.INSTANCE;
}
}plugin.xml
<extensions defaultExtensionNs="com.intellij">
<postStartupActivity implementation="com.example.MyLspStartup"/>
</extensions>Note: On IntelliJ 2024.3+,
PreloadingActivityis no longer run, so register the server definition from aProjectActivitywired to thepostStartupActivityextension point.
A green icon in the IDE's bottom-right confirms a successful connection.
The Developer Guide provides in-depth instructions and reference material for plugin authors, including:
- Step-by-step setup walkthrough
- Alternative server-definition styles —
RawCommandServerDefinitionandProcessBuilderServerDefinition - Custom LSP Initialization Parameters
- Request timeout tuning
- Legacy components-based setup
LSP4IntelliJ supports a wide range of LSP capabilities.
See the Features guide for descriptions, triggers, and demos of each capability.
Note: Features are mainly tested on IntelliJ IDEA.
The LSP4Intellij code is distributed under the Apache license 2.0.
A huge thanks to all the amazing contributors! 🚀
LSP4IntelliJ is heavily inspired by the intellij-lsp plugin community.
Credits should go to the original author for his astounding work.