redhat-developer / redhat-developer/vscode-java

Unable to add external jar to work with LSP

Đang mở
#3,912 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

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:
  1. Open a Java project in VS Code.
  2. Add JAR files directly to the java.project.referencedLibraries setting.
  3. 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:
    Screenshot1
  • Missing syntax highlighting:
    Screenshot2
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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.