-
Notifications
You must be signed in to change notification settings - Fork 208
Developer Manual Integrate Language Server Into Client
This page contains useful information for integrating the Spring Boot language server into another client that supports the language server protocol.
(most of this has been discussed here: https://github.com/spring-projects/sts4/issues/76, as a reference)
We plan to publish the language server itself as a standard Maven artifact in the future, but that hasn't been done yet. So the easiest way to grab the latest version of the Spring Boot language server is to download the .vsix
file of the Spring Boot Tools
extension for Visual Studio Code (there is a link on the VSCode marketplace entry to download the extension in the Resources
section). Once you have the .vsix
file, you can extract it (it is a ZIP file) and find the spring-boot-language-server JAR file inside.
Same as above.
Here are the options we use for launching the Spring Boot language server:
- from within Eclipse: https://github.com/spring-projects/sts4/blob/master/eclipse-language-servers/org.springframework.tooling.boot.ls/src/org/springframework/tooling/boot/ls/SpringBootLanguageServer.java#L47
- from within Visual Studio Code: tbd
- from within Theia: tbd
tbd
tbd
You have two options if you want to debug the Spring Boot language server.
- you can modify the startup params to include the JVM debug options and create a remote debug connection to it from your favorite IDE. This is easy, but it isn't super useful if you want to modify the language server itself.
- you can launch the Spring Boot language server as a standard Java process from within your IDE (as any other Java process) and debug it from there. When doing so, you would need to start it up with a specific param to invert the process the client connects to the language server (so the client needs to allow this kind of creating a connection).
(more details tbd)
The Spring Boot language server depends on the JDT language server to be around and running. The language server communicates with the JDT-LS in order to resolve projects and get classpath information, search for java types and packages, and similar things.
The setup for this communication is described in more detail here: https://github.com/spring-projects/sts4/issues/76#issuecomment-427074764
The Spring Boot language server does not depend on any specific build system available at runtime. It communicates with the JDT-LS in order to get classpath information, etc. Therefore it usually does not build projects on its own or resolve the classpath on its own.
There is a deprecated mechanism included in the Spring Boot language server that uses Maven or Gradle directly to resolve project/classpath information, but that mechanism will be removed in the near future and users of the Spring Boot language server should not rely on that fallback mechanism to be there.
- Installation (latest release + snapshots)
- User Guide
- Getting Started
- Navigation
- Live Application Information
- Content Assist
- Version Validation
- Upgrade Support
- Validations and Quick Fixes
- WebFlux Support
- Boot Properties Editor
- Boot Dashboard
- Other Editors
- STS3
- Custom VM args
- FAQ
- Changelog
- Known Limitations & Issues
- Report an Issue
- Developer Manual
- Overview
- Language Server Integration into Clients
- Communication with JDT LS
- STS4 Language Server Protocol Extensions