Skip to content

WIP: Add java language server client

Ghost User requested to merge wip/albfan/java-langserver into master

Basic integration with ls running from host

Go to Definition

This is based on https://github.com/georgewfraser/java-language-server. It uses jdk 11 to create a new custom JVM that parses java project while compiling it.

git clone https://github.com/georgewfraser/java-language-server
cd java-language-server
JAVA_HOME=/path/to/jdk11 scripts/link_mac.sh

NOTE: link_mac.sh works for linux too.

run builder with:

JAVA_LANGSERVER_COMMAND=/path/to/java-language-server/dist/mac/bin/launcher

TODO:

LSP IMPROVEMENTS: (can open a different issue)

  • Greyed options until it is ready. Is there any signal for lsp to communicate it is ready? Go to definition do not work until a little lapse, and I guess is just because ls is building the project
  • Allow to restart ls (Sometimes ls keeps saying Symbol not found, I think something goes wrong and restarting whole Builder resolves it, not sure what happens, but I guess restarting ls should fix it)
Edited by Christian Hergert

Merge request reports