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

feat(languages): GraphQL #1515

Merged
merged 6 commits into from
Jan 21, 2022

Conversation

jaredramirez
Copy link
Contributor

Hey there,

This PR adds support for Graphql!

@the-mikedavis
Copy link
Member

If you run cargo xtask docgen it'll clear up the CI ❌

@jaredramirez jaredramirez changed the title Add Graphql language support feat(languages): GraphQL Jan 15, 2022
@EpocSquadron
Copy link
Contributor

Would it be any trouble to add this to the injections file for JavaScript, for named template strings of the form:

local query = gql`...`

That would cover anywhere Apollo client is used, which I think is the most common library for forming queries in react and vue.

@the-mikedavis
Copy link
Member

the-mikedavis commented Jan 15, 2022

I think this should do it:

; runtime/queries/javascript/injections.scm
((call_expression
   function: (identifier) @ignore
   arguments: (template_string) @injection.content)
 (#eq? @ignore "gql")
 (#set! injection.language "graphql"))

@jaredramirez
Copy link
Contributor Author

Added!

@jaredramirez
Copy link
Contributor Author

Friendly ping @archseer @the-mikedavis 😃

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, nice work!

@archseer archseer merged commit 0b55b21 into helix-editor:master Jan 21, 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.

None yet

5 participants