redhat-developer / redhat-developer/vscode-java
Unable to add external jar to work with LSP
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I'm using Visual Studio Code for a Java project without build tools (e.g., Maven or Gradle). I've added JAR files using the java.project.referencedLibraries setting. While auto-completion and documentation pop-ups work, there is no proper syntax highlighting (LSP-based) for the referenced classes and methods within the JARs.
Steps to Reproduce:
- Open a Java project in VS Code.
- Add JAR files directly to the
java.project.referencedLibrariessetting. - Use a class or method from the JAR in your code.
Expected Behavior:
LSP features should include syntax highlighting for classes and methods from the JARs, in addition to auto-completion and documentation pop-ups.
Actual Behavior:
While auto-completion and documentation pop-ups work, syntax highlighting does not apply for the JAR dependencies.
Screenshot:
- Referencing the JAR:
- Missing syntax highlighting:
Additional Context:
This issue occurs in a setup without Maven or Gradle. Are there additional configurations required to enable full syntax highlighting for JAR dependencies?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code using a Java project without Maven or Gradle and the java.project.referencedLibraries setting, then trace how referenced JAR classes are handled for syntax highlighting. Done means classes and methods from those JARs receive syntax highlighting while completion and documentation continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100