Skip to content

Dart code in vscode semantic token type seems wired. #5324

Closed

Description

@allnan

Hello there,
there are some issues when custom my vscode code hightlight.
image

I think both key1 and key2 are parameter.label , but why doesn't key1 have modifiers? How can I fix this, thank you.

environment:
Dart Code extension: 3.98.1
Flutter extension: 3.98.0 (activated)

App: Visual Studio Code
App Host: desktop
Version: win 1.94.2

Activity

  1. DanTup commented on Oct 30, 2024

    @DanTup
    Member

    I'm not sure why the modifier is missing, I'll take a look.

    Something else that is odd in your screenshot is that the left key1 screenshot doesn't show a semantic token type at all. Can you reproduce this and copy/paste the exact code? For me, it seems to have a semantic token type of parameter still:

    image

  2. DanTup commented on Oct 30, 2024

    @DanTup
    Member

    https://dart-review.googlesource.com/c/sdk/+/392582 will fix the issue of modifiers not being included on dynamic parameters. It's a fix in the Dart SDK, so it'll show up in a future Dart/Flutter SDK release.

    I'll keep this issue open until the fix is merged.

  3. added
    in editorRelates to code editing or language features
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Oct 30, 2024
  4. added this to the v3.102.0 milestone on Oct 30, 2024
  5. DanTup commented on Oct 30, 2024

    @DanTup
    Member

    The fix was merged in dart-lang/sdk@37af167.

  6. DanTup commented on Nov 25, 2024

    @DanTup
    Member

    I forgot to close this when the fix merged. This ships in a future Dart/Flutter SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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 bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions