Struggling a little bit to figure out what a sensible approach would be here.
Using the legacy StreamLanguage parser works fine on its own for YAML support.
However, I was hoping to use the parseMixed functionality as per the Mixed Language example, but it seems like there’s no means to nest a lezer parser inside a non-lezer outer language?
I’ve already got the ability to extract the code block string literal locations from a separate parsing pass that is executed in a change observer. Which means I can use the js language parser.parse call to get back trees for the appropriate subset ranges of the document.
I’m stuck at that point though, not clear to me how one might overlay or merge those trees when the outer language is a StreamLanguage or whether that’s entirely impossible.
The overlay logic seems to already take priority over the outer language in that manner, but perhaps there’s no way to specify that behavior as an overlay range vs a direct node replacement?
Was hoping there might be a simple solution to the conceptual idea of intercepting all language logic in the manner of a node overlay for a document range instead.