-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[BUG] In VSCode, the java code highlighting is disabled under lombok annotation #2950
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
Comments
As far as I know VSCode uses the the eclipse JDT language server for highlighting. In eclipse syntax highlighting problems like this one occur if the generated lombok code uses wrong source positions. These problems are really hard to debug because even the smallest change in a file might fix the problem. I just installed the latest VSCode and it works for me. Can you share this project or at least some code that I can use to reproduce the issue? |
Indeed, Eclipse can also reproduce the issue. |
Thanks, I was able to reproduce the issue and also found a hacky solution to fix it. I also noticed that the javadoc copy stuff doesn't work in VSCode. |
Yes, the javadoc issue happens from time to time. And if you are able to, would you mind sharing the hacking way so that I can solve it within the existing versions? |
@Ranger-118 Sorry for the delay, I created a PR and uploaded a pre-built version for you to test it. To use this version you have to disable the VSCode lombok plugin and add |
In my eclipse I get highlighting issues from time to time. Going off of gut and vague recollections, @Rawi01 Can you provide me the contact info of your tailor? The wizard hat you pulled this rabbit out of is amazing. Are you running vscode inside a debugger, or running vscode's language server in one to figure this one out? |
Test all good, thank you! |
@rzwitserloot 😄 I only debug the language server. I figured out how it works by looking at the lombok plugin which had to add the So basicaly just add |
@Rawi01 I found that the issue still happens with |
Describe the bug
VSCode has an initialized highlighting style for any java file code and a default highlighting style for the compiled java code, when I use the lombok annotation for the current class, the compiled code highlighting was disabled under the annotation.
To Reproduce
Open the Spring boot project in VSCode, and add any lombok annotation to the class containing any methods.
Expected behavior
Expect that the lombok annotation doesn't impact the code highlighting under the annotation in VSCode
Version info (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: