redhat-developer / redhat-developer/vscode-java
Unable to add external jar to work with LSP
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
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?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 VS Code 中使用不含 Maven 或 Gradle 的 Java 项目以及 java.project.referencedLibraries 设置复现该问题,然后跟踪引用的 JAR 类是如何为语法高亮进行处理的。完成标准是这些 JAR 中的类和方法能够获得语法高亮,同时补全和文档功能继续正常工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100