Skip to content

Possible incompatibilities with jar:file scheme #295

Open

Description

@ahakanbaba

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.

Activity

  1. idelice commented on Dec 24, 2025

    @idelice

    I believe i fixed this here https://github.com/idelice/jls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions