jparise / vim-graphql

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

graphql codegen support #98

Closed zfogg closed 1 year ago

zfogg commented 1 year 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 1 year 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
  }
}
`);