Description
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.