Gremlin Syntax Highlighter

I want to implement an Gremlin Synthax highlighter (displayed in HTML) via javascript/typescript. How do i have to achieve something like this ? Do we highlight just the variables , methods, lambdas seperatly or do we highlight the individual gremlin methods ?
6 Replies
spmallette
spmallette•2y ago
I've always liked standard Groovy syntax highlighting for Gremlin code. I imagine that would be a good base to start from if you wanted something more advanced looking. might be nice if enum/tokens popped out a bit more than what i remember groovy doing. that could be a nice feature to work into gremlint if you cared to contribute your work to open source. @KelvinL or @bechbd any thoughts on how Gremlin syntax should be highlighted?
Dave
Dave•2y ago
In the graph-notebooks we use Groovy syntax highlighting which does pretty well and would be a good place to start. I agree that having enums/tokens highlighted would be a nice addition as well as highlighting parameters for parameterized query support
sofiane0097
sofiane0097OP•2y ago
Thank you i will use it later on
sofiane0097
sofiane0097OP•2y ago
@spmallette @bechbd is there any git repo / project (open source) that does this , so i can use this as reference
Dave
Dave•2y ago
GitHub
graph-notebook/src/graph_notebook/nbextensions/gremlin_syntax/stati...
Library extending Jupyter notebooks to integrate with Apache TinkerPop, openCypher, and RDF SPARQL. - aws/graph-notebook
sofiane0097
sofiane0097OP•2y ago
thank you 🙂
Want results from more Discord servers?
Add your server