Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gql inside vue file not properly highlighted #701

Closed
3 tasks done
mastito03 opened this issue Feb 20, 2018 · 4 comments · Fixed by kumarharsh/graphql-for-vscode#86
Closed
3 tasks done

gql inside vue file not properly highlighted #701

mastito03 opened this issue Feb 20, 2018 · 4 comments · Fixed by kumarharsh/graphql-for-vscode#86

Comments

@mastito03
Copy link

mastito03 commented Feb 20, 2018

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: Linux
  • Vetur version: 0.11.7
  • VS Code version: 1.20.1

Problem

I'm using vue-apollo and using gql syntax inside vue file. but gql syntax not properly highlighted.

this what inside .vue file
.vue file

this what inside .js file
.js file

Reproducible Case

install GraphQL for VSCode extension for syntax highlight

@octref
Copy link
Member

octref commented Feb 20, 2018

What GraphQL is using:

"injectionSelector": "L:source -string -comment"

It's injecting grammar to source.js. Vetur is embedding source.js. This should work automatically.
I have created an upstream issue: microsoft/vscode#44056

@flakeparadigm
Copy link

While it certainly doesn't address the issue with grammars not inheriting injections as expected, a fix for his has been merged into GraphQL for VSCode extension mention in the original issue report.

@octref
Copy link
Member

octref commented Feb 6, 2019

@flakeparadigm Thanks, sorry for the late response, it's working as expected:

image

Would you mind me sending similar PRs for other graphql extensions that fix the injection grammar?

@octref octref closed this as completed Feb 6, 2019
@flakeparadigm
Copy link

I don't mind at all, feel free to! :)

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

Successfully merging a pull request may close this issue.

4 participants