Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible incompatibilities with jar:file scheme #295

Open
ahakanbaba opened this issue Nov 6, 2024 · 0 comments
Open

Possible incompatibilities with jar:file scheme #295

ahakanbaba opened this issue Nov 6, 2024 · 0 comments

Comments

@ahakanbaba
Copy link

I have discovered seeming incompatibilities if this language server returns a uri with jar:file scheme.

I hope I am not making a mistake here. So if a configuration or usage error is happening, I would appreciate the feedback.

For third party dependencies that have source jar files, it looks like the java-language-server returns an URI like

jar:file:///Users/hakanbaba/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.34/861d5074b9a04a7f1c1e128584a66b2b815fc3d4/lombok-1.18.34-sources.jar!/lombok/Data.java

I have seen that the vim-lcs does not handle that well and tries to open a file that is named
jar:file:///Users/hakanbaba/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.34/861d5074b9a04a7f1c1e128584a66b2b815fc3d4/lombok-1.18.34-sources.jar!/lombok/Data.java rather than looking inside the lombok.jar file and then loading the Data.java file.

I am not sure whether the gap is in java-language-server or in vim-lcs. The gap may very well be in vim-lsc.

In any case, it would be nice to mentioned that possibly incompatible behavior in the readme (https://github.com/georgewfraser/java-language-server/?tab=readme-ov-file#vim-with-vim-lsc) . The main readme very confidently recommends to use vim-lsc as a vim plugin.

To Reproduce.

  1. Install a java runtime.
  2. Unzip the java-tutorial-main.zip java-tutorial-main.zip
  3. run ./gradlew build idea
  4. go to Word.java
  5. use the java-language-server on the lombok.Data line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant