TextMate -> Lezer converter?

Hi Marijn,

Are there any plans to make a best-effort converter from TextMate to Lezer, or provide a tutorial/guide on such a process?

I’m aware of import-tree-sitter and have found an unmaintained tm2ts rust crate, but trying to cobble these together is likely to be both painful and unsuccessful.

My end-goal is to PoC moving Grafana’s code editors from Monaco to CM6, but i’ve discovered that we have a few places with custom Monaco language defs that will be hard to port entirely by hand for someone unfamiliar with either system, so some kind of non-zero starting point - even if a script can convert 50-70% - would make the task seem less gnarly than it currently appears.

i guess we already have a lezer-traceql repo (in addition to the Monaco lang def). i think we use lezer for parsing to create a code builder UI, but don’t use if to hook up a CM6 editor…yet.

thanks!

No, there are no plans in that direction. The TextMate format seems sufficiently different from context-free grammars that such a tool sounds like it’d be difficult to pull off well.