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

Support page-query and static-query? #6

Open
MarcelloTheArcane opened this issue Nov 26, 2020 · 1 comment
Open

Support page-query and static-query? #6

MarcelloTheArcane opened this issue Nov 26, 2020 · 1 comment

Comments

@MarcelloTheArcane
Copy link

MarcelloTheArcane commented Nov 26, 2020

Currently, <page-query> and <static-query> tags aren't recognised by Vetur. This means that code folding and syntax highlighting aren't available.

Is this the right place to create something to make that work? Apologies, I'm not entirely sure how the code formatting works on the Vetur plugin, and whether this repository only works for tags within the <template>.

@tyankatsu0105
Copy link
Member

tyankatsu0105 commented Dec 21, 2020

@MarcelloTheArcane
Thanks for the issue!

Yes. This helper json supports only inside template.

However, Vetur now supports Snippet.
So you can scaffold code like this:

<WORKSPACE>/.vscode/vetur/snippets/page-query/page-query.vue

<page-query>
query {
  posts: ${1} {
    edges {
      node {
        id
        title
      }
    }
  }
}
</page-query>

demo

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

No branches or pull requests

2 participants