4

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!

2
  • '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
    Commented Nov 16, 2018 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
    Commented Nov 16, 2018 at 23:34

1 Answer 1

3

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*

2
  • Thank you! This really should be documented. 🤦
    – dead10ck
    Commented Jan 26, 2022 at 20:50
  • 2
    March 2023, and same weird undocumented requirements of the data dir are still in place. repeatedly bashes head on desk. Commented Mar 2, 2023 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.