3

Summary

I've been trying to get Eclipse's JDT LS (JLS) working with vim-lsp (in Neovim), but have been unsuccessful in synchronising the JLS with a Gradle project. I am, unfortunately, constrained to Windows.

The Problem

Using this configuration (commit #d1c7a25 at the time of posting), I cannot synchronise the JLS with a Gradle project "due to an error configuring Eclipse" because of an "invalid project description" (see log).

Trawling through Google and the GitHub issues of both the JLS and vim-lsp plugin has gotten me nowhere.

Remarks

I feel like it's most likely an issue with my configuration. If anyone has got this working with other LSP plugins aside from YouCompleteMe (such as CoC or LanguageClient) those setups are also welcome, but vim-lsp is preferred.

To reiterate, and just in case:

Thanks!

Community
  • 1
  • 1
Priddles
  • 201
  • 1
  • 2
  • 6
  • 'Invalid project description' means either the project name is not valid for the platform or the project URI is invalid. Since this is Windows there are quite a few things that can make a project name invalid. – greg-449 Nov 16 '18 at 11:42
  • @greg-449 The JLS creates a project named `jdt.ls-java-project` and using Eclipse IDE, I can both create a project with the same name in a fresh workspace and load the workspace created by the JLS. There is a `rootUri` in the logs (which I believe is part of the LSP) which points to the root directory of the repository. This URI is formatted correctly, but setting the `rootUri` to the JLS workspace just seemed to confuse it. – Priddles Nov 16 '18 at 23:34

1 Answers1

2

Figured it out.

The workspace directory for the JLS (specified by the command line argument -data) can't be nested under the project's own directory.

*bashes head on desk*

Priddles
  • 201
  • 1
  • 2
  • 6