Open TSMMark opened 4 years ago
hey! i would like to support this. we would want to create a grammars/graphql.rb.json file, and sprinkle in a few regexes for detecting these delimiters, for highlighting support at least
we could even just borrow this from apollo:
now, parsing ruby on the language server side for full-featured language support is another matter. we would need a node/typescript compatible tool for that.
@TSMMark let me know if you're still interested! sorry I just took the project over a couple months ago
I can try to dedicate some time but I really have no experience doing syntax parsing or editor plugins so any pointers of files I would have to touch and tests I should write would be a huge help getting me started
@acao Still very interested in this but not sure how to start or how to test. Also I have no need for syntax highlighting, as that's covered by another plugin I'm using https://marketplace.visualstudio.com/items?itemName=kumar-harsh.graphql-for-vscode
parsing ruby on the language server side for full-featured language support is another matter
Would we actually need to parse the Ruby language just to examine query strings? I found this opal package, something like that? https://github.com/opal/opal
the language grammar files are where this happens for highlighting. they are json files with regular expressions for selecting tokens. if you see a graphql highlighting mode another extension has, you can open a PR
for actually supporting language features other than highlighting, that logic lives in the seperate LSP server repo that this repo depends on
Thanks for making this awesome plugin. Works great for our js codebase
However our graphql api is written using graphql-ruby and so all of our graphql specs are Ruby files. In these files we define heredoc string literals like this:
Would it be possible to support Ruby files with this plugin?
If so, is it something a new contributor would be able to tackle? I wouldn't mind taking a stab at implementing it if someone gives me a few pointers where to start.
Thanks again!