redhat-developer / redhat-developer/vscode-java
Unable to add external jar to work with LSP
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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?
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện vấn đề trong VS Code bằng một dự án Java không sử dụng Maven hoặc Gradle và thiết lập java.project.referencedLibraries, sau đó theo dõi cách các lớp trong những JAR được tham chiếu được xử lý để tô sáng cú pháp. Được xem là hoàn tất khi các lớp và phương thức từ những JAR đó được tô sáng cú pháp, đồng thời tính năng hoàn thành và tài liệu vẫn hoạt động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, vscode
- Lĩnh vực
- devtools
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100