Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure highlighting works with typescript type parameters #2474

Merged
merged 1 commit into from
Jun 4, 2022

Conversation

acao
Copy link
Member

@acao acao commented Jun 4, 2022

At least a partial fix for #2356, enables highlighting for template strings with typescript type parameters

Borrowed from https://github.com/apollographql/vscode-graphql/blob/main/syntaxes/graphql.js.json

Also casually bump the version for vscode-graphql once since 0.4.9 is released already from my local, so 0.4.10 becomes the next resolution we want.

This is not the most ideal way of accomplishing this, but I couldn't get it working with a single pattern

type param example

@changeset-bot
Copy link

changeset-bot bot commented Jun 4, 2022

🦋 Changeset detected

Latest commit: 324228d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vscode-graphql Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Jun 4, 2022

Codecov Report

Merging #2474 (324228d) into main (2d91916) will increase coverage by 3.05%.
The diff coverage is 26.34%.

@@            Coverage Diff             @@
##             main    #2474      +/-   ##
==========================================
+ Coverage   65.70%   68.76%   +3.05%     
==========================================
  Files          85       71      -14     
  Lines        5106     4223     -883     
  Branches     1631     1410     -221     
==========================================
- Hits         3355     2904     -451     
+ Misses       1747     1315     -432     
  Partials        4        4              
Impacted Files Coverage Δ
packages/codemirror-graphql/src/hint.ts 94.73% <ø> (ø)
packages/codemirror-graphql/src/lint.ts 100.00% <ø> (ø)
packages/codemirror-graphql/src/results/mode.ts 47.05% <ø> (ø)
...kages/codemirror-graphql/src/utils/forEachState.ts 100.00% <ø> (ø)
packages/codemirror-graphql/src/utils/hintList.ts 95.65% <ø> (ø)
...ckages/codemirror-graphql/src/utils/mode-indent.ts 0.00% <0.00%> (ø)
packages/codemirror-graphql/src/variables/hint.ts 89.70% <ø> (ø)
packages/codemirror-graphql/src/variables/mode.ts 79.48% <ø> (ø)
packages/graphiql-react/src/editor/whitespace.ts 100.00% <ø> (ø)
packages/graphiql-react/src/utility/debounce.ts 0.00% <0.00%> (ø)
... and 90 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1818982...324228d. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2022

The latest changes of this PR are not available as canary, since there are no linked changesets for this PR.

@acao
Copy link
Member Author

acao commented Jun 4, 2022

@captbaritone @mjmahone et al - here's a great example of where apollo's grammars are still some of the best out there for vscode. would love to see if they are willing to open source them as an npm package or a highlighting-only-extension like we were discussing?

Edit: in this case I needed to actually add to their grammar rules, but there are plenty of cases where theirs are the best.

@acao acao force-pushed the vscode-typed-param-fix branch 3 times, most recently from 13e0f75 to a525e73 Compare June 4, 2022 14:16
At least a partial fix for #2356, enables highlighting for typescript type parameters

Also casually bump the version for vscode-graphql once since 0.4.9 is released already from my local, so 0.4.10 becomes the next resolution we want.
@acao acao force-pushed the vscode-typed-param-fix branch from a525e73 to 324228d Compare June 4, 2022 14:40
@acao acao merged commit 70bc61e into main Jun 4, 2022
@acao acao deleted the vscode-typed-param-fix branch June 4, 2022 14:47
@acao acao mentioned this pull request Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant