Feature: Support graphql tagged heredoc string literals in non-js files
See original GitHub issueThanks 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:
# spec/whatever_spec.rb
<<~GRAPHQL
query Whatever {
whatever {
id
}
}
GRAPHQL
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!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Support for string literals as description · Issue #196
A small concern, the GraphQL specification states that comments start with #. This will remain right? Because I see that "Support descriptions; ...
Read more >vim-graphql
A Vim plugin that provides GraphQL file detection, syntax highlighting, ... GraphQL syntax inside of heredoc and nowdoc strings is supported.
Read more >gatsby - How Can I Call a Template Literal Tag Function on ...
My question is, is there any way to "call that tag function" (or really any template literal tag function) on an ordinary (...
Read more >autotests/input · master · Frameworks / Syntax Highlighting ...
Name Last commit Last update
themes improve themes showcase to show more styles 2 years ago
.gitignore Git Ignore: more highlight 2 weeks ago
Dockerfile Add...
Read more >libKF5SyntaxHighlighting5-5.71.0-lp152.1.1 RPM for ppc64le
0: * debchangelog: add Groovy Gorilla * fix unit test refs * Updated test file for Logtalk syntax highlighting * Update Logtalk language...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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
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