Skip to content
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

Semantic Token Lost with Lombok Annotations in Enum Due to Conflict with Eclipse Java Plugin in VS Code #1383

Closed
Skyxim opened this issue Oct 11, 2024 · 3 comments
Assignees
Labels
for: vscode something that is specific for VSCode theme: validation type: bug

Comments

@Skyxim
Copy link

Skyxim commented Oct 11, 2024

Describe the bug
When using Lombok annotations with an enum in VS Code, the semantic token is lost, leading to missing syntax highlighting and unresolved identifiers. This issue occurs when the Spring Boot Tools plugin is enabled. The issue does not occur when the plugin is disabled or when Lombok annotations are not used with the enum.

To Reproduce
Steps to reproduce the behavior:

  1. Install VS Code and enable both the Spring Boot Tools plugin and the Lombok plugin.

  2. Create a new Java project and add an enum class with a Lombok annotation.

import lombok.Getter;

  

public enum Status {

    ACTIVE,

    INACTIVE;

  

    @Getter

    private final String description = "status";

}
  1. Open this project in VS Code. You will notice the semantic token (e.g., syntax highlighting, identifier resolution) is not functioning properly.

  2. Disable the Spring Boot Tools plugin and restart VS Code. Semantic tokens should now work as expected.

  3. If you remove the Lombok annotations from the enum, the issue does not occur, even with the Spring Boot Tools plugin enabled.

@martinlippert
Copy link
Member

As a quick workaround, you can disable the syntax highlighting for embedded languages in the preferences Spring Boot Tools -> Features -> Embedded Syntax Highlighting. That should bring back the old behavior and you can continue to use all the other Spring Boot Tools features - instead of disabling the extension altogether.

@Skyxim
Copy link
Author

Skyxim commented Oct 15, 2024

As a quick workaround, you can disable the syntax highlighting for embedded languages in the preferences Spring Boot Tools -> Features -> Embedded Syntax Highlighting. That should bring back the old behavior and you can continue to use all the other Spring Boot Tools features - instead of disabling the extension altogether.

Thank you for the help, this method has indeed temporarily resolved the issue.

@BoykoAlex BoykoAlex added this to the 4.26.0.RELEASE milestone Oct 15, 2024
@BoykoAlex
Copy link
Contributor

Fixed via b6cb5d0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: vscode something that is specific for VSCode theme: validation type: bug
Projects
None yet
Development

No branches or pull requests

3 participants