LSP4IJ is a free and open-source Language Server protocol (LSP) client compatible with all flavours of IntelliJ.
It allows you to integrate any language server
that communicates with its client via stdio
:
- by
developing an IntelliJ plugin
with LSPextension points
:- com.redhat.devtools.lsp4ij.server extension point to define a language server.
- com.redhat.devtools.lsp4ij.languageMapping to associate an IntelliJ language with a language server definition.
- by manually adding language server definitions, supporting custom server settings. This approach doesn't require developing a specific IntelliJ plugin.
LSP4IJ also provides:
- an LSP Consoles view to tracks LSP requests, responses and notifications in a console:
- a Language Servers preferences page to configure the LSP trace level, the debug port to use to debug language server:
You can find more documentation in:
- the developer guide, providing step-by-step instructions on how to integrate a language server in LSP4J in an external IntelliJ plugin.
- the User-defined language server documentation, explaining how to integrate a language server in LSP4J with few settings.
- the user guide, which explains how to use LSP console and Language Server preferences.
- the LSP Support overview, describing which LSP features are implemented, and how.
Here are some projects that use LSP4IJ:
- Intellij IDEA 2022.3 or more recent (we try to support the last 4 major IDEA releases)
- Java JDK (or JRE) 17 or more recent
This is an open source project open to anyone. Contributions are extremely welcome!
Project is managed by Gradle. So building is quite easy.
Run the following command:
./gradlew buildPlugin
The plugin distribution file is located in build/distributions
.
You can also easily test the plugin. Just run the following command:
./gradlew runIde
You can also download and install CI builds of the latest commits or a specific pull request:
- open the
Build plugin zip
workflow - click on the build you are interested in
- scroll down and download the
LSP4IJ <version>.zip
file - install
LSP4IJ <version>.zip
into IntelliJ IDEA by following these instructions.
You can easily install nightly builds from the nightly channel:
- in IntelliJ, open
Setting > Plugins > [Gear icon] > Manage Plugin Repositories...
- Add
https://plugins.jetbrains.com/plugins/nightly/23257
and pressOK
Nightly builds are published once a day.
The LSP4IJ plugin collects anonymous usage data and sends it to Red Hat servers to help improve our products and services. Read our privacy statement to learn more. This extension respects the Red Hat Telemetry setting which you can learn more about at https://github.com/redhat-developer/intellij-redhat-telemetry#telemetry-reporting
File a bug in GitHub Issues.
Eclipse Public License 2.0. See LICENSE file.