Skip to content

Highligh issue with another textmate grammar  #5121

Closed
@woprandi

Description

@woprandi

Describe the bug
I'm working on this extension : https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql to add support to syntax hightlight inside Dart source code.
The port is straightforward (Draft PR here : graphql/graphiql#3612).
Without extension it works but with the Dart extension the hightlight stops to work after few seconds. I guess there are a kind of conflict between grammars (https://github.com/Dart-Code/Dart-Code/blob/master/syntaxes/dart.json and https://github.com/graphql/graphiql/pull/3612/files#diff-1a844416b43dcd649c939cc179b8a5157efd1860392a397657656fdbd6e9168d) but I don't know which and I'm not an expert
I found set settings "editor.semanticHighlighting.enabled": false "fixes" the issue but I guess I'll get some behavior changes elsewhere (and I don't know if it's legitimate)

To Reproduce
Steps to reproduce the behavior:

  1. Clone my fork https://github.com/woprandi/graphiql/tree/main
  2. cd vscode-graphql-syntax
  3. yarn && yarn vsce:package
  4. Install vscode-graphql-syntax-1.3.6.vsix
  5. Open tests/__fixtures__/test.dart, graphql block highlight should works
  6. Install Dart extension
  7. Highlighting will disappears like the video

Expected behavior
Hightlighting works

Screenshots

test.webm

image
Without Dart extension

image
With Dart extension

Please complete the following information:

You can run the Dart: Collect Diagnostic Information command from the VS Code command palette (F1) to easily capture this information or provide it manually.

  • Operating System and version: Fedora 40
  • VS Code version: 1.89.1
  • Dart extension version: 3.88.1
  • Dart/Flutter SDK version: 3.4.1
  • Target device (if the issue relates to Flutter debugging):

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions