question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DanTupcommented, Oct 25, 2021

Note: Since the tokens come from the language server, if/when merged, it will require an SDK update before it shows up in VS Code (not a VS Code extension update).

0reactions
DanTupcommented, Oct 25, 2021

I’ve a change open to add a modifier here:

https://dart-review.googlesource.com/c/sdk/+/217940/

This allows you to customise how the identifier part of the annotation looks (either to be the same as the annotation marker/parens or separately) like this:

"editor.semanticTokenColorCustomizations": {
	"rules": {
		"annotation": "#00ff00",
		"*.annotation": "#00ff00",
	},
},

Which looks like the following:

Screenshot 2021-10-25 at 15 42 31

Note: Only the identifier part is covered, so nested expressions/identifiers will be colour normally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change colour of cluster annotation in market. iOS, Swift
I can change the individual annotations but not the cluster. Below is my code. @available(iOS 11.0, *) func mapView ...
Read more >
Annotations | Docs - TinyMCE
TinyMCE Annotations provides the ability to describe particular features or add general information to a piece of content and creates identifiers for each ......
Read more >
Chapter 7 Cell type annotation | Basics of Single-Cell Analysis ...
This method assigns labels to cells based on the reference samples with the highest Spearman rank correlations, using only the marker genes between...
Read more >
Functional annotation by identification of local surface ... - NCBI
We describe a method for the function-related annotation of protein structures by means of the detection of local structural similarity with ...
Read more >
INCEpTION User Guide
INCEpTION supports span layers in order to annotate a span from one ... static / static pastelle - all annotations receive the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found