Skip to content

Allow dart syntax highlighting theming #1688

Closed

Description

@xster

In IntelliJ, you can theme local variables, instance variables, static variables, function params etc etc all differently.

May be a dupe or may not be supported at all in vscode.

Activity

  1. DanTup commented on May 7, 2019

    @DanTup
    Member

    Our syntax highlighting is all regex-based using a TextMate grammar (https://github.com/Dart-Code/Dart-Code/blob/master/syntaxes/dart.json) so I don't think this is currently possible (it's also why we have strange quirks like #311) until VS Code gets an API for better colouring (microsoft/vscode#585).

  2. added this to the Backlog milestone on May 7, 2019
  3. added
    in editorRelates to code editing or language features
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on May 7, 2019
  4. modified the milestones: Backlog, On Deck on Oct 27, 2020
  5. modified the milestones: On Deck, v3.18.0 on Dec 8, 2020
  6. DanTup commented on Dec 15, 2020

    @DanTup
    Member

    Fixed by the semantic token work in dart-lang/sdk@cb2ede5.

    In order to get the fix you'll need Dart-Code v3.18.0 (a preview release should be available later today/tomorrow), be using LSP Preview, and have a Dart SDK from after yesterday (the most recent nightly works, and of course the next releases of Dart/Flutter SDKs will include this).

    You can then use a theme that colours semantic tokens, or set them up in your own settings. For example, this sets static variables/properties to be rendered red:

    Screenshot 2020-12-15 at 12 09 20

  7. DanTup commented on Dec 22, 2020

    @DanTup
    Member

    Due to some last minute issues, support for LSP 3.16 (which supports semantic tokens) won't be included in v3.18, but hopefully v3.19 next month instead.

  8. modified the milestones: v3.18.0, v3.19.0 on Dec 22, 2020
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 enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions