/lsp4mp

Technology lsp4mp

Primary LanguageJavaEclipse Public License 2.0EPL-2.0

Eclipse LSP4MP - Language Server for MicroProfile

Build Status License Gitter chat for lsp4mp

A language server implementation based on the Language Server Protocol for MicroProfile. This Language Server for MicroProfile (LSP4MP) provides core language support capabilities (such as code complete, diagnostics, quick fixes) to enable developers to quickly and easily develop applications using MicroProfile APIs.

This project contains:

You can build all projects at once by running the buildAll.sh script (buildAll.bat on Windows).

Features

General

When you open a MicroProfile project, lsp4mp provides:

  • Symbols to help you navigate to JAX-RS REST endpoint methods, searchable using the naming convention: @/api/endpointName: GET

Properties files

In 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

In 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

Architecture

For information on the architecture/project structure see architecture.md

Getting started

JDK 11 is required to build the language server and the eclipse.jdt.ls extension.

  1. Clone this repository
  2. Open the folder in your terminal / command line
  3. Run ./buildAll.sh (OSX, Linux) or buildAll.bat (Windows)

Maven coordinates

Here are the Maven coordinates for LSP4MP (replace the X.Y.Z version with the latest release):

<dependency>
  <groupId>org.eclipse.lsp4mp</groupId>
  <artifactId>org.eclipse.lsp4mp.ls</artifactId>
  <version>X>Y>Z</version>
  <classifier>uber</classifier>
  <exclusions>
    <exclusion>
      <groupId>org.eclipse.lsp4j</groupId>
      <artifactId>org.eclipse.lsp4j</artifactId>
    </exclusion>
    <exclusion>
      <groupId>org.eclipse.lsp4j</groupId>
      <artifactId>org.eclipse.lsp4j.jsonrpc</artifactId>
    </exclusion>
  </exclusions>
</dependency>

for Gradle:

compile(group: 'org.eclipse.lsp4mp', name: 'org.eclipse.lsp4mp', version: 'X.Y.Z', classifier: 'uber')

You will have to reference the Maven repository hosting the dependency you need. E.g. for Maven, add this repository to your pom.xml or settings.xml :

<repository>
  <id>lsp4mp-releases</id>
  <url>https://repo.eclipse.org/content/repositories/lsp4mp-releases/</url>
  <snapshots>
    <enabled>false</enabled>
  </snapshots>
  <releases>
    <enabled>true</enabled>
  </releases>
</repository>

And if you want to consume the SNAPSHOT builds instead:

<repository>
  <id>lsp4mp-snapshots</id>
  <url>https://repo.eclipse.org/content/repositories/lsp4mp-snapshots/</url>
  <releases>
    <enabled>false</enabled>
  </releases>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
</repository>

Clients

Extensions

Both the MicroProfile JDT LS Extensions and MicroProfile Language Server can be extended to provide additional functionality. A common extension is to provide additional snippets via an external JAR.

Example extensions:

Feedback

Please report bugs, issues and feature requests by creating a GitHub Issue