Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

MicroShed/microprofile-lsp-client-vscode

Repository files navigation

MicroProfile Language Support for VS Code

⚠⚠ This repository is deprecated! See Tools for MicroProfile instead. ⚠⚠

Provides language support for MicroProfile specifications in Java files, making use of the MicroProfile Language Server.

Installation

  1. Download vscode-microprofile-0.0.1.vsix from the releases page.
  2. In VS Code, press Shift Command P to open the Command Palette
  3. Type Extensions: Install from VSIX... then press Enter
  4. Navigate to and install vscode-microprofile-0.0.1.vsix
  5. Wait for a prompt at the bottom right of the screen to indicate that the extension has been installed. Click Reload Now on that prompt if indicated.

Features

Diagnostic Warnings and Quick Fix

  • MP Health: Annotations and interface implementation.

    • @Liveness/@Readiness annotation quick fixes
    • implements HealthCheck quick fix
  • MP Rest Client: CDI injection annotations, Rest Client interface registration.

    • @Inject and/or @RestClient annotation quick fix
    • Diagnostic warning for interface being injected elsewhere but not registered as a Rest Client.

Code complete suggestions with additional info

  • MP Health: Annotation code complete suggestions prioritized in list with additional info.

Source actions

  • MP OpenAPI: Generate OpenAPI annotations via source action.
    • An @Operation annotation will be generated for any number of methods in a single class with a Response return type who do not already have an @Operation annotation.

Code snippets with fields that you can fill in

  • MP OpenAPI: @Operation or @Parameter annotation code snippets

Building from source

  1. Clone MicroProfile Language Server
  2. Clone MicroProfile Language Support for VS Code
  3. From microprofile-language-server directory: mvn clean package to generate microprofile-language-server-0.0.1-SNAPSHOT.jar
  4. From microprofile-lsp-client-vscode directory: npm install
  5. Copy microprofile-language-server/target/microprofile-language-server-0.0.1-SNAPSHOT.jar to microprofile-lsp-client-vscode/jars/ folder
  6. From microprofile-lsp-client-vscode directory: vsce package to generate vscode-microprofile-0.0.1.vsix