Quickest way to add basic Ruby support

Hey there,

I’m looking to add Ruby support to CodeMirror 6, for a little side project. What would be the easiest way to achieve that? It seems like it requires a lezer grammar as well as a language package… Is the easiest to just fork javascript for example? I don’t need full language support, just the basics really, eg. keywords, literals and comments.


The old Ruby mode exists in the legacy-modes package, and can be wrapped in a StreamLanguage to get basic support. That won’t do code folding, but otherwise should provide satisfactory Ruby highlighting.

Ah nice, will try that out, thanks.