-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to add external jar to work with LSP #3912
Comments
can you provide a sample project reproducing the issue? |
I attempted to reproduce the issue using the following code: import edu.duke.*;
public class PerimeterRunner {
public double getPerimeter(Shape s) {
double totalPerimeter = 0.0; // Initialize perimeter to 0
Point prevPt = s.getLastPoint(); // Start with the last point
return totalPerimeter;
}
} I used the |
Your example works for me. Your 1st screenshot shows syntax highlighting is working correctly. I don't know what your 2nd screenshot is supposed to show, but certainly not syntax highlighting. Because hovering over Point shows you proper documentation, the courserajava.jar is properly accessed by the Java language server. |
The error occurs when I have vscode-java enabled. I’ll try disabling each one to make sure if it’s a conflict issue. |
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:
java.project.referencedLibraries
setting.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:
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?
The text was updated successfully, but these errors were encountered: