Skip to content

Conversation

jparise
Copy link
Owner

@jparise jparise commented Oct 4, 2020

In order to match GraphQL syntax inside of template strings, we recreate
the JavaScript/TypeScript template string syntax regions and embed our
syntax within them. These region's 'start' and 'end' patterns were
therefore being matched using our syntax groups.

Instead, use 'matchgroup=' to explicitly match the boundaries using the
base syntax's groups. This better integrates with those filetype's
natural syntax and indentation definitions while still giving us control
over the embedded GraphQL syntax.

In order to match GraphQL syntax inside of template strings, we recreate
the JavaScript/TypeScript template string syntax regions and embed our
syntax within them. These region's 'start' and 'end' patterns were
therefore being matched using our syntax groups.

Instead, use 'matchgroup=' to explicitly match the boundaries using the
base syntax's groups. This better integrates with those filetype's
natural syntax and indentation definitions while still giving us control
over the embedded GraphQL syntax.
@jparise jparise merged commit 28869c2 into master Oct 4, 2020
@jparise jparise deleted the region-syntax branch October 4, 2020 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant