Skip to content

Add support for semantic tokens in the language service #60262

Open

Description

@JannikLassahn

Which @angular/* package(s) are relevant/related to the feature request?

language-service

Description

Semantic tokens are part of the LSP protocol to improve existing syntax highlighting with relevant contextual coloring.

Support for semantic tokens would improve the overall editing experience for Angular templates and close the gap to other frameworks and even commercial IDEs in this regard.
For example: Jetbrains IntelliJ is able to correctly highlight Angular components in template markup and differentiate between members and local variables in @for loops.
TypeScript already provides tokens as well, so users would benefit from similiar and familiar syntax highlighting.

Potential related requests/issues:

Proposed solution

To keep complexity manageable (and server performance acceptable), one should start small with the most common types (class, member, variable) and determine further work according to community feedback.

I have created PR #60260, sort of as a "proof of concept" and reference implementation for future work on this topic.

Alternatives considered

Activity

  1. added
    area: language-service
    on Mar 10, 2025
  2. added this to the needsTriage milestone on Mar 10, 2025
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

    area: language-service

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions