Skip to content

Variable assignment/reference syntax highlighting lost between v1.53.0 and v1.54.0 #1249

Closed

Description

@dbmckie

I use the Spring Boot Tools Extension for VS Code. Between versions 1.53.0 and 1.54.0 local variable lose syntax highlighting when they are referenced.

Highlighting is fine when variable is initially defined but when later referenced or assigned, highlighting is lost. All things the same, v1.53.0 works fine.

This is on a clean install of VS Code with only the Java Extension Pack and Spring Boot Extension Pack installed.

image
V1.53.0

image
V1.54.0

Activity

  1. added this to the 4.23.0.RELEASE milestone on May 8, 2024
  2. martinlippert commented on May 8, 2024

    @martinlippert
    Member

    The only thing that comes to my mind is the new semantic token support that we have in place. I wonder why and how that could cause this, but we need to investigate this. Thanks a lot for reporting this.

  3. BoykoAlex commented on May 8, 2024

    @BoykoAlex
    Contributor

    Looks like there is some kind of conflict between java semantic highlighting and ours for embedded HQL/JPQL. Needs to be investigated. One thing i could fix quickly is if one disables the JPQL support then java semantic token highlight works the same as before. However, seems that for both working well together language client in vscode might need to be involved

  4. BoykoAlex commented on May 9, 2024

    @BoykoAlex
    Contributor

    I pushed something that allows the setting "JPA Query Support" (boot-java.jpql) to properly disable JPQL/HQL syntax highlighting: 8f691f3
    If you grab a snapshot build of the extension from the bottom of this page: https://cdn.spring.io/spring-tools/snapshot/STS4/nightly-distributions.html it should highlight Java code properly (accounting for JDT LS semantic tokens highlighting) if JPQL support is off in the settings.

    I noticed that VSCode semantic tokens support would honour the first semantic token provider that provides non-null tokens and ignore the tokens coming from the rest of them. This isn't promising at all :-\ Seems like this is a design decision... I may try tokens for a range rather than for a whole doc as it may work differently.

  5. BoykoAlex commented on May 14, 2024

    @BoykoAlex
    Contributor

    We've pushed a fix for the issue which is kind of a workaround until VSCode properly supports multiple semantic tokens providers for the same language: 6243fee
    We'll track the VSCode side of things via #1251 separately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: vscodetype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions