Skip to content

Support coloring the identifier part of an annotation the same as the annotation @ marker #3621

@shujaatak

Description

@shujaatak

Problem

I'm always frustrated to see that while the semantic token type for annotations should be annotation but :

  1. The semantic token type for annotations override and required is currently set as property.
  2. The semantic token type for annotation Deprecated is currently set as class.

image
image

Due to the above problem one can't assign distinct colors to properties and annotations.

Solution I'd like

Please set the semantic token type as annotation for all annotations including but not limited to Deprecated, override and required .

According to official docs , any class can be transformed into an annotation, as long as they provide a const constructor and since annotations are prefixed by @ so they are easy to be recognized and assigned the semantic token type as annotation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions