Translation between textmate grammars and ksyntaxhighlighting xml
Hi! I am currently toying with a syntax highlighting file for the typst language. New languages which do not have support in Kate are typically supported in VSCode and come with a textmate grammar. Hypothetically if I were to build an automatic translation between both grammars, where would I start?
- Is there a toy implementation of how KSyntaxHighlighting tokenizer works? I am ideally looking for a tiny python-ish implementation that consumes an XML and spits out the painting info that I can easily grok
- Is there a design doc that documents the speed/feature tradeoffs for KSyntaxHighlighting?
- Writing the XMLs by hand is mildly annoying (like escaping regexes). Does a better DSL exist to build syntax files?
Thanks!