We are happy to announce the first release of the Language Server for MicroProfile (LSP4MP) and the Tools for MicroProfile VS Code extension. LSP4MP is a language server that provides core language support for MicroProfile, including code complete, diagnostics, snippets and more. Tools for MicroProfile leverages LSP4MP to provide a rich VS Code editing experience for developers. Tools for MicroProfile works with your favorite MicroProfile runtimes, such as Quarkus, Open Liberty, and Helidon.
LSP4MP is based on the Language Server Protocol, an open source specification that standardizes the way language servers communicate with editors and IDEs. Language servers provide language-specific knowledge and power language features such as completion, diagnostics, and hover. Through the Language Server Protocol, a single language server can be re-used in multiple IDEs and editors with minimal effort.
Tools for MicroProfile works together with LSP4MP to provide language support in VS Code for both microprofile-config.properties files and Java files.
In microprofile-config.properties files, Tools for MicroProfile provides the following features for MicroProfile properties:
– Definition support
– Formatting support
– Validation and Quick Fixes
– Outline support (flat or tree view)
In Java files, Tools for MicroProfile provides MicroProfile-specific support for the following features :
– Validation and Quick Fixes
– Code Lens support
– Code snippets
LSP4MP is an open source project that welcomes any and all contributions. The project originated from Red Hat’s Quarkus Language Server, with contributions from IBM. If you have ideas for new MicroProfile language features, you can open an issue on the project’s issue tracker or chat with us in the Gitter room for LSP4MP.
Tools for MicroProfile requires the Language Support for Java (TM) by Red Hat extension and a minimum JDK of Java 11. For more information about the minimum JDK requirements, see About Upgrading to Java 11 for VS Code for Java.
Installing the extension
Tools for MicroProfile enhances your MicroProfile development experience with the following features:
Hover documentation for microprofile-config.properties
With Tools for MicroProfile, you can easily view documentation for MicroProfile config properties by hovering over the property key.
Completion for MicroProfile config properties
You can use the Ctrl+Space (⌥+Space for macOS) keyboard shortcut to list completion options. Eclipse LSP4MP uses ConfigProperty annotations and classpath information to show only the MicroProfile config properties available to your project.
Validation for MicroProfile config properties
Tools for MicroProfile also displays validation for MicroProfile config properties, which detects unknown properties, duplicate properties, and incorrect data types.
Java Snippets for MicroProfile APIs
Tools for MicroProfile provides snippets for several MicroProfile APIs including JAX-RS resources, MicroProfile health checks, and frequently used MicroProfile annotations.
Diagnostics and Quick Fixes for MicroProfile Java files
Tools for MicroProfile can detect and display warnings for incorrect usages of MicroProfile APIs and provide Quick Fixes.
Hover support for MicroProfile config properties in Java files
When you hover over a config property in Java code, the value of the property that is defined in your microprofile-config.properties file is displayed.
CodeLens support for MicroProfile Rest Client
When you use MicroProfile Rest Client, CodeLens shows the full REST endpoint path.
More to come, join the conversation!
The roadmap for Tools for MicroProfile and Eclipse LSP4MP includes improved support for MicroProfile APIs, new code snippets, and more. If you have any issues or feature requests, please let us know by creating a GitHub issue. We welcome and value any feedback or ideas. If you are interested in contributing to either vscode-microprofile or Eclipse LSP4MP, check out these contributing guides:
VS Code MicroProfile contribution guide
LSP4MP contribution guide