[vscode-graphql-syntax] description comments are incorrectly highlighted
See original GitHub issueDescription
In schema files, Markdown blocks / field descriptions seem to have incorrectly highlighted syntax.
Neither single-quoted nor triple-quoted blocks feature a properly highlighted Markdown. Moreover, the color may be misleading as it is the same one that is used for the #
comments.
This bug is really annoying so I will do my best to help you fix this issue.
Below you can find a simple reproduction / code example when this bug occurs.
Example
My setup
GraphQL.vscode-graphql v0.7.5
GraphQL.vscode-graphql-syntax v1.0.4
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Syntax highlighting for docstring comments is incorrect #19
It's valid syntax for docstring comments to have no line breaks, but the syntax highlighting fails on them, ... graphql / vscode-graphql Public...
Read more >GraphQL syntax highlighting in VSCode js file - Stack Overflow
Show activity on this post. It has syntax highlighting, validation and more: GraphQL extension for VSCode adds syntax highlighting, validation, ...
Read more >Apollo extension for VS Code - Apollo GraphQL Docs
The extension enables you to: Add syntax highlighting for GraphQL files and gql templates inside JavaScript files; Get instant feedback and intelligent ...
Read more >GraphQL: Language Feature Support
Extension for Visual Studio Code - GraphQL LSP extension that adds autocompletion, validation, go to definition, hover, outline and more.
Read more >Go to definition with graphql extension for VsCode - Reddit
Hi everyone, i am having a hard time setting up the graphql extension for VsCode, the syntax highlighting only highlights the variable and ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Update: Thanks to safety_jon#5076 we concluded that the bug occurs only with some themes from the
Community Material Theme
extension. I would suggest keeping the issue open until we find the fix and share it here in the comments with others.@acao thank you for the reminder! I did a search and can’t find duplicates for this one, so I’ll add my notes from Discord here and close.
Dear future reader, This issue isn’t a bug, it’s a symptom of certain VSCode themes’ implementation of token scopes (both
Community Material Themes
andNord Theme
have been identified with this issue, but there are likely more in the wild).Here’s a screenshot of a working theme where you’ll see the
foreground
token iscomment
:And here’s a non-working theme where the
foreground
token ispunctuation
:To remedy in your local install, follow @FrankySnow’s comments above to set a tighter scope for the offending token. Even better, open a pull request at your theme’s repository!