question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[vscode-graphql-syntax] description comments are incorrectly highlighted

See original GitHub issue

Description

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

image

My setup

GraphQL.vscode-graphql v0.7.5
GraphQL.vscode-graphql-syntax v1.0.4

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mpieczabacommented, Sep 24, 2022

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.

1reaction
jonathanawesomecommented, Oct 8, 2022

@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 and Nord 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 is comment: Screen Shot 2022-09-24 at 12 33 05 PM

And here’s a non-working theme where the foreground token is punctuation: Screen Shot 2022-09-24 at 12 32 27 PM

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found