HELP with grammar for Editors plugin for Crystal

Hi pals.

As detailed here, I found a grammar that make a perfect(?) syntax highlighting.

You can see it working there.

The grammar is part of highlight.js package, but I don’t understand how to translate this for the editors (VS Code, Sublime and so on…).

Please, can someone want to help?

There are several “perfect” syntax highlighting solutions but they’re unfortunately not usable as a starting point for a completely different highlighter. Much easier to start with its own Ruby highlighter and adapt that.
I might look into that, as I already did this pygments/crystal.py at master · pygments/pygments · GitHub
And, well, you can see it working here Coding style - Crystal

1 Like

My assessment is: there is no dire situation with the current highlighter that would warrant looking for alternatives. Just needs some fixes.
Also just found that my highlighter suffers from that exact same issue :man_facepalming:

1 Like

You are right, the situation is not so bad, but having found an alternative, why don’t we try to understand if it can be adapted to our needs and solve the problem once and for all?

(I have contacted via email the creator of the highlight.js grammar…wait for a reply)

Opened Update Crystal syntax highlighting by oprypin · Pull Request #137 · crystal-lang-tools/vscode-crystal-lang · GitHub

1 Like

Published to the Marketplaces.
Make some little mistakes (e.g. not updating the changelog)
I’ll do tomorrow after testing the Release and see what other issue close eventually.

Thanks @oprypin @HertzDevil