-
Notifications
You must be signed in to change notification settings - Fork 206
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
VSCode Spring Boot extension causes semantic token loss upon loading #1260
Comments
@Skyxim what is wrong with the pre-release version java syntax highlighting? Can you show the diffs with spring boot tools disabled vs enabled? Are you on Windows? |
The pre-release looks mostly fine, but the semantic tokens for class definitions are still missing. There might be other issues I haven’t noticed yet. My setup is VSCode on macOS, with the LSP running on a Debian 12 virtual machine. I’ve also tried using Windows with SSH remote, and the same issue persists. |
Hmm.. I'm on mac as well so ideally i should be able to see the same as you. The class definition token is |
Sorry, the image doesn't provide an explanation. I mainly want to point out that there is no semantic token in the definition. Its color should be the same as the class used in the If I disable the Spring Boot plugin and restart VSCode, the Java LSP will correctly return the semantic tokens for the class definitions. |
I have completely removed Spring Boot Tools extension from vscode. Uninstalled and removed from This is how vanilla Java syntax highlighting from TextMate + RedHat Java extension semantic highlighting looks like for me I do see Now if I disable all Java related extensions, i.e. to disable Java extension, i.e. Java LS and its semantic token provider i see only the TextMate grammar syntax highlighting which looks like: How does this look like for you? |
Do you have any extensions installed beyond the standard Java Extension Pack? I don't see I see this: This is VSCode + Java Extension Pack - no Spring extensions of any kind. I suspect that you have another extension trying to enhance Java syntax highlighting. Multiple semantic token providers for the same language don't work well together. |
I have only installed these two extensions for Spring Boot development. My issue depends on whether the |
Thank you for the suggestion. I tried it, but it didn’t work.
This is the color I set for the class. I expect the class definitions to match the color I’ve set. But due to the loss of semantic tokens, it falls back to a default value. |
@Skyxim can you please try installing spring-boot extension VSIX from https://cdn.spring.io/spring-tools/snapshot/STS4/nightly-distributions.html |
The semantic token for class declarations are now returning normally. Thank you for your contribution. |
Describe the bug
When using the VSCode Spring Boot extension, the extension causes semantic tokens to be lost after loading, affecting code semantic highlighting and other related features. I tried using the preview version of the Spring Boot extension, which restored most tokens, but class tokens are still missing. Restarting the Java language server restores the tokens.
To Reproduce
1. Install VSCode.
2. Install the RedHat Java extension and ensure semantic tokens are enabled.
3. Install the Spring Boot extension.
4. Completely close VSCode.
5. Reopen VSCode and load a Spring Boot project.
6. Observe that semantic tokens load correctly at first.
7. After the Spring Boot extension loads, semantic tokens are lost.
Sample
Release:
Pre-Release:
The text was updated successfully, but these errors were encountered: