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
Syntax highlighting for common IDEs #79
Comments
🎬 take 1 for Atom https://atom.io/packages/language-graphql syntax only, looking forward to trying autocomplete :) |
Since I guess lots of people are using GraphGL for Android projects, is it a good idea to make an IntelliJ plugin? |
IntelliJ would be great |
On my way |
I finished a basic version: @leebyron: Is it possible that the spec is a bit incomplete in respect to type definitions starting with 'input'? But the grammar at the end was extremly helpful, thanks for that! |
I've created a GraphQL plugin for IntelliJ IDEA and WebStorm that relies on the JavaScript reference implementation. It provides roughly the same features as Graph_i_QL, including schema-aware completion, error highlighting, and in-editor schema documentation: https://github.com/jimkyndemeyer/js-graphql-intellij-plugin The integration between the Java-based plugin and the reference implementation JavaScript parser is available as a Node.js based language service: https://github.com/jimkyndemeyer/js-graphql-language-service It might prove useful for enabling GraphQL language features in other IDEs, much like the TypeScript language service did for Sublime and Atom. |
Awesome, that looks way better than what I did :) I'll try it, as soon as it is approved. Any idea how I can help the ~100 downloaders of my plugin migrate to your plugin? Edit: I think I'll just put up a notification. |
@Gregoor A notification should do the trick :) How long did it take to get your plugin approved? In case you want early access to the plugin, it can be downloaded from https://dl.dropboxusercontent.com/u/12996502/js-graphql-intellij-plugin/1.0.0/js-graphql-intellij-plugin.jar Just add it using "Install plugin from disk..." |
I think the approval process is bound to their 9-5 work cycle (in the czech republic). At least that's the feeling I got. Thanks for the direct link. |
I started on a Vim plugin: https://github.com/jparise/vim-graphql It still needs work but handles file detection, syntax highlighting, and folding pretty well so far. |
Can some one make a graphql package for lovely sublime text? 😄 |
@abdulhannanali I just released a GraphQL package for Sublime Text. Right now is just a syntax highlighter, but we plan to add autocompletion and almost all the capabilities we have with GraphiQL. |
Autocomplete and lint from a GraphQL endpoint in atom. |
@nicolaslopezj That's great news. Would you consider using https://github.com/graphcool/graphql-config#method-2-configuration-via-graphqlrc-file to configure the endpoint? |
Yes I will! |
@nicolaslopezj - that looks cool :D I've been working to provide a language service interface for GraphQL that could be used across common IDEs. It'll also support firing up the GraphQL server to cache schema/fragment definitions/etc to be used for validation/autocomplete suggestions. The interface has methods to bring other common IDE features, such as hyperlink/outline views/and etc. It's been developed and tested with Nuclide, but I thought this could be useful for Atom users as well - it'd be awesome if we can collaborate on making that happen! |
For @abdulhannanali and anyone else sad about the Sublime Text highlighter not working, I just released one that does. https://packagecontrol.io/packages/GraphQL |
@dncrews Thanks a lot @dncrews will surely help people using Sublime but I have long moved to Visual Studio Code ❤️ |
Derailing this thread a bit because these are not IDEs but since we're talking syntax highlighting, some highlighting libraries as of 21 March 2017:
Let me know if you are aware of other ones. |
A port of @jimkyndemeyer's GraphQL plugin for IntelliJ IDEA to work with Python files in the JetBrains IDE would be amazing as well. |
Could be awesome to see a plugin for PHPStorm ! |
@jimkyndemeyer Awesome work! Your plugin changed my life in Javascript. Wondering though, do you think it would be hard work to make it also autocomplete queries in PHP Heredoc ? Example: private function getQuery()
{
$query = <<<'GQL'
query ProgrammesForHome($region: String, $travelStart: DateTime, $page: Int, $limit: Int) {
programmes(region: $region, page: $page, limit: $limit) {
total
page
limit
edges {
node {
id
name
catchPhrase
price {
amount
currency {
code
}
}
offers {
id
}
}
}
}
}
GQL;
return $query;
} |
Closing this generic issue since we now have pretty good coverage across many IDEs. Please open future language service issues on specific IDEs! |
This would be a great task to claim for an aspiring contributor.
The text was updated successfully, but these errors were encountered: