This Visual Studio Code extension provides support for the development of MicroProfile®-based applications, via the LSP4MP project, which consists of:
microprofile-config.properties files, you will benefit with:
- Completion support for MicroProfile properties
- Hover support for MicroProfile properties
- Definition support for MicroProfile properties
- Format support for MicroProfile properties
- Validation and Quick Fix support for MicroProfile properties
- Outline support (flat or tree view)
Java files, you will benefit with:
- Completion support for MicroProfile
- Hover support for MicroProfile
- Validation and Quick Fix support for MicroProfile
- Code Lens support for MicroProfile
- Code snippets
Supported VS Code settings
The following settings are supported:
microprofile.tools.formatting.surroundEqualsWithSpaces : Insert spaces around the equals sign when formatting the application.properties file. Default is
microprofile.tools.trace.server : Trace the communication between VS Code and the MicroProfile Language Server in the Output view.
microprofile.tools.symbols.showAsTree : Show MicroProfile properties as tree (Outline). Default is
microprofile.tools.validation.enabled : Enables MicroProfile validation. Default is
microprofile.tools.validation.duplicate.severity : Validation severity for duplicate properties for MicroProfile
microprofile.tools.validation.syntax.severity : Validation severity for property syntax checking for MicroProfile
microprofile.tools.validation.required.severity : Validation severity for required properties for MicroProfile
microprofile.tools.validation.expression.severity : Validation severity for property expressions for MicroProfile
microprofile.tools.validation.unknown.severity : Validation severity for unknown properties for MicroProfile
*.properties files. Default is
microprofile.tools.validation.unknown.excluded : Array of properties to ignore for unknown properties validation. Patterns can be used ('*' = any string, '?' = any character).
["*/mp-rest/providers/*/priority", "mp.openapi.schema.*", "kafka-streams.*", "camel.*"].
microprofile.tools.codeLens.urlCodeLensEnabled : Enable/disable the URL code lenses for REST services. Default is
microprofile.tools.validation.value.severity: Validation severity for property values for MicroProfile
*.properties files. Default is
microprofile.tools.validation.unassigned.excluded: Array of properties to ignore for unassigned properties validation in Java files. Patterns can be used ('*' = any string, '?' = any character).
microprofile.tools.inlayHint.enabled: Enable/disable the inlay hint support. Default is
Note for MicroProfile Rest Client properties:
Due to this issue, the MP Rest property:
<mp-rest-client-class>/mp-rest/providers/<mp-rest-provider-class>/priority reports an unknown error.
To avoid having this error, you must configure the following in
This settings is set by default.
By default, Tools for MicroProfile provides:
- Support for the
microprofile-config.properties file (completion, validation, etc.) for the properties of MicroProfile specs (config, health, fault tolerance, etc.).
- Support in java files (diagnostics, codelens, etc.) taking into account the API of each of the MicroProfile specs.
The support for properties and java files can be extended with:
- Additional language features (diagnostics, quick fixes, etc.) in Java files for modules other than MicroProfile specs.
- Additional properties support for properties other than those defined by MicroProfile specs (Ex. Quarkus properties)
- Additional language / document selectors to allow MicroProfile language features in files other than
microprofile-config.properties (Ex. the
application.properties file for Quarkus)
To contribute these features, you must create a vscode-extension that declares the
microprofile contributions in its package.json. These contributions will be picked up automatically by vscode-microprofile when it starts up the language server.
Contributing to properties and Java support
LSP4MP can be extended to support custom completion, hover, validation, etc by using the Java Service Provider Interface (SPI). vscode-microprofile provides the ability to use your custom lsp4mp extension by contributing external JARs to the classpath of lsp4mp.
To contribute an external JAR you must create a vscode extension which embeds your lsp4mp extension JAR and declares the path to your JAR in the extensions package.json
For an example of how this can be used you can look at vscode-quarkus and the quarkus-ls lsp4mp extension. vscode-quarkus contributes an external jar which provides additional language support for quarkus properties and java files.
Contributing to MicroProfile Language / Document Selector support
It is also possible to contribute additional document selectors which are used to register additional file types / languages with the lsp4mp language server
For an example of how this can be used you can look at vscode-quarkus which contributes a document selector for Quarkus's
application.properties file in order to provide MicroProfile/Quarkus properties support in this file.
With your approval, vscode-microprofile extension 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
redhat.telemetry.enabled setting, which you can learn more about at https://github.com/redhat-developer/vscode-redhat-telemetry#how-to-disable-telemetry-reporting
This is an open source project open to anyone. Contributions are extremely welcome!
For information on getting started, refer to the CONTRIBUTING instructions.
CI builds can be installed manually by following these instructions:
Download the latest development VSIX archive from here.
Select 'Install from VSIX...' and choose the
Please report bugs, issues and feature requests by creating a GitHub Issue.
Apache License 2.0.
See LICENSE file.
MicroProfile® and the MicroProfile logo are trademarks of the Eclipse Foundation