packages/vscode-graphql-syntax/README.md
Adds full GraphQL syntax highlighting and language support such as bracket matching.
.graphql/.gql/.graphqls highlighting%graphql() ) (example: test.re)You'll want to install this if you do not use graphql-config, or want to use
the highlighting with other extensions than vscode-graphql
Feel free to open a PR to fix, enhance any language support, or even add new languages 😍
see:
Whether fixing a bug or adding a new delimiter for your language, here are a few tips for you:
tests/__fixtures__yarn test -u in the syntax extension workspace, and observe whether vscode-textmate tokenizes your example properlymeta.embedded.block.graphqlyarn vsce:package in the workspace and right click to install the bundled vsix extension, and open the fixture file<span id="adding-a-lang"></span>
package.json contributions as well, in the grammars section. the text.html.markdown is for applying to markdown codeblockssource.{lang} from a vscode-provided syntax grammar, or a popular, official contributed grammar. To find the name of the scope for any token's highlighting, use Developer: Inspect Editor Tokens & Scopes from the vscode command palette.inline.graphql.{lang} for consistencytests/__fixture__ to document example usage, and a test spec to __tests__ to assert the snapshot, pointing to the source you createdyarn test -u in the workspace to add the snapshotyarn vsce:package in the syntax extension workspace and right click and install the bundled vsix file, then view the test fixtureWe would love for the other graphql extension authors to freely use this syntax
extension as well! Even if your extension is designed to replace
vscode-graphql, or if it's designed for other other purposes. It uses an MIT
license, but attribution is always a nice gesture to the original authors :)
MIT License
Copyright 2022 GraphQL Contributors