jparise / vim-graphql

A Vim plugin that provides GraphQL file detection, syntax highlighting, and indentation.
MIT License
487 stars 25 forks source link

graphql codegen support #98

Closed zfogg closed 10 months ago

zfogg commented 10 months ago

i use https://github.com/dotansimha/graphql-code-generator and it gives me a function to call like

gql(`
query MyQuery {
  myType {
    id
  }
}
`);

is there some way to get this plugin to syntax highlight a gql function call like this? i would love that

jparise commented 10 months ago

We don't support that library directly, but you should be able to add # gql (or # graphql) to the start of your template string to enable GraphQL syntax highlighting.

gql(`# gql
query MyQuery {
  myType {
    id
  }
}
`);