Skip to content

Fix @ symbol highlighting in Dart annotations#73

Open
tsinis wants to merge 2 commits intozed-extensions:mainfrom
tsinis:fix/dart-annotation-at-symbol-highlighting
Open

Fix @ symbol highlighting in Dart annotations#73
tsinis wants to merge 2 commits intozed-extensions:mainfrom
tsinis:fix/dart-annotation-at-symbol-highlighting

Conversation

@tsinis
Copy link
Copy Markdown

@tsinis tsinis commented Mar 22, 2026

Hey Team!

Reference to (part of) the Issue: #29

  • The @ symbol in annotations (e.g. @override, @Deprecated()) was highlighted as an operator while the annotation name received @attribute styling, making them appear as two visually distinct tokens
  • Capture @ as @attribute inside the annotation rule and remove it from the operators block
  • Reorder annotation rules after the generic uppercase @type pattern so that @attribute takes final precedence for names like Deprecated

Before:

Screenshot 2026-03-22 at 22 49 29

After:

image

…ator

The `@` symbol in Dart annotations (e.g. `@override`, `@Deprecated()`) was
highlighted as an operator, making it visually distinct from the annotation
name which received `@attribute` styling. This made annotations appear as
two separate tokens instead of a single semantic unit.

- Capture `@` as `@attribute` inside annotation rules
- Remove `@` from the operators block
- Move annotation rules after the generic uppercase identifier pattern
  so `@attribute` takes precedence over `@type` for names like `Deprecated`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant