Skip to content

Annotation Color Scheme Inconsistency #8789

@natty-pluz

Description

@natty-pluz

In IntelliJ → Settings → Editor → Color Scheme → Dart, the Annotation color setting is only applied to const annotations (e.g. @freezed), but not to class-based annotations (e.g. @Freezed()).

Current Behavior

  • @freezed

    • Highlighted using the Metadata color (as expected for annotations).
  • @Freezed()

    • Freezed is highlighted as a regular class name.
    • Inherits color from Classes → Class name instead of the Annotation/Metadata color.

This results in inconsistent highlighting between const and class-based annotations.

Expected Behavior

Both forms of annotations:

@freezed
@Freezed()

should use the same Annotation/Metadata color setting in the Dart color scheme.

Why This Matters

Class-based annotations are very common in Dart (e.g. @Freezed(), @JsonSerializable(), etc.). Treating them as regular classes instead of annotations makes it harder to visually distinguish annotations from other class usages and reduces consistency in syntax highlighting.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions