-
-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
Description
New graphql codegen client preset is not using template strings for graphql queries. It uses graphql() function with string arguments. Using this we don't get syntax highlighting.
const query = graphql(`
query ExampleQuery {
example {
id
}
}
`)
Possible solutions:
-
Similar to
g:graphql_javascript_tagsoption we could use something asg:graphql_javascript_function=["graphql", "gql"]and mark the string inside function for syntax highlighting -
Use magic comment as many graphql tools and extensions do:
const query = graphql(/* GraphQL */`
query ExampleQuery {
example {
id
}
}
`)
- Add prefixes and document
let g:graphql_javascript_tags = ["gql", "graphql", "Relay.QL", "gql(", "graphql("]
Vim Version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
felamaslen