Skip to content

Semantic highlighting seems to remove syntax highlighting for JavaScript files #537

Closed

Description

@martinlippert

As reported here: spring-projects/spring-tools#702 (comment) - the semantic highlighting of LSP4E seems to cause the regular syntax highlighting for JavaScript files to (more or less) go away. This doesn't look right to me, but I don't have deep insights into this area. WDYT?

Activity

  1. mickaelistria commented on Mar 8, 2023

    @mickaelistria
    Contributor

    I think it's related to #517 and/or #522

  2. rubenporras commented on Mar 8, 2023

    @rubenporras
    Contributor

    Yes, @martinlippert , could you retry with the latest snapshot?

  3. martinlippert commented on Mar 8, 2023

    @martinlippert
    ContributorAuthor

    @rubenporras Works perfectly now, thanks!!! So closing this one here.

  4. rubenporras commented on Mar 8, 2023

    @rubenporras
    Contributor

    I am happy that it fixed the issue for you. Just in case you are interested, I think your LS supports semantic highlight and is sending token information back, but you have not configured a way to map those tokens to a style. If that is so it is a pity that you do not use the information to improve the presentation.

  5. martinlippert commented on Mar 8, 2023

    @martinlippert
    ContributorAuthor

    @rubenporras Actually, we use the WWD support for JavaScript here, so looks like the token <-> style mapping should be included there, right?

  6. rubenporras commented on Mar 9, 2023

    @rubenporras
    Contributor

    it looks like either TM4E is not properly configured or the server sends tokens which have no style set on the client side. Maybe you should check org.eclipse.lsp4e.operations.semanticTokens.TokenTypeMapper.apply(String) to understand which one it is (that is, when it returns null).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions