graphql / vscode-graphql

MIGRATED: VSCode GraphQL extension (autocompletion, go-to definition, syntax highlighting)
https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql
MIT License
557 stars 71 forks source link

highlight an embedded graphql string for .svelte files #292

Closed lukasIO closed 3 years ago

lukasIO commented 3 years ago

Actual Behavior

grafik

Expected Behavior

grafik

Steps to Reproduce the Problem Or Description

install the most recent plugin version, type

const myQuery = (lang) => `#graphql
  query {
    something
  }
`

in a .svelte file.

My naive guess is, that source.svelte is still missing here: https://github.com/graphql/vscode-graphql/blob/33a5edc32e7483602b2e95eee09184073cd28abe/package.json#L67-L73 while it is already added here: https://github.com/graphql/vscode-graphql/blob/52e3b52636d56c4e113818f2935b605733776739/grammars/graphql.js.json#L2

Specifications

Logs Of TS Server || GraphQL Language Service

acao commented 3 years ago

@lukasIO can you open a PR? thanks!

asmimo commented 3 years ago

I am not getting auto completion inside svelte files(nor vue too). Do I need to configure it or is it not available yet?

acao commented 3 years ago

So, what lukas suggested here would introduce highlighting. To introduce completion for svelte files would be another effort entirely, but is on the radar and will eventually be on a roadmap

Shinigami92 commented 2 years ago

@acao Could you link me the issue to track the progress of completion support for vue? I need this also