Thanks for the link. I just briefly scanned the post about Lezer. It illustrates the joy of engineering :-)
Leo's syntax coloring and importers are highly optimized examples of the general parsing/tokenizing problem. Both have gone through multiple iterations.
Leo's syntax coloring is (indirectly) driven by jEdit language description files. Leo's code depends on the details of Qt's syntax coloring classes, so adapting Leo's code to vs-code might be challenging.
Leo's importers use per-language syntax (token) tables. leoJS could probably use the importer scheme without major changes.