Skip to content

Highlighting for type arguments in documentation comment references: [Map<K, V>] (vscode) #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jonasfj opened this issue Nov 5, 2024 · 1 comment

Comments

@jonasfj
Copy link
Member

jonasfj commented Nov 5, 2024

Example

  /// Create a [Map<K, V>] from all elements.
  ///
  /// This is a short-hand for [Map.fromEntries].
  Map<K, V> toMap() => Map<K, V>.fromEntries(this);

On Github (as illustrated above)

image

In VSCode

image

@DanTup it's unclear to me if this is a vscode bug, or?

In generated dartdoc

Just to show that writing [Map<K, V>] in a documentation does work as expected.

image

@DanTup
Copy link
Collaborator

DanTup commented Nov 5, 2024

It seems like a bug, though not here :-)

If you disable semantic tokens in VS Code (which means it'll be coloured according to this grammar) then it'll show the same as GitHub:

image

My recollection was that we don't have the correct info in the server to mark these up (and there's an existing issue about this at Dart-Code/Dart-Code#3648), however I'm questioning this now (because usually we support ctrl+click navigation), and also I see that Ctrl+Click doesn't work on this item either, so I think there is more to it than just that.

Could you file this in https://github.com/dart-lang/sdk (that you can't ctrl+click it and the colouring is bad) and I will try to do some digging when I can? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants