Open mattvr opened 4 months ago
The only way I can think of is adding more grammars here, replacing the injectTo
value with the parent language. This would allow to create a ts-vento
language, html-vento
, css-vento
, etc. But I don't know if there's a way to automatically detect the parent language without having to set it explicity.
This is how liquid vscode extension does
Came across this while playing around with Vento. I'd definitely love to see the extra HTML goodies like the liquid extension provides!
When I'm using Vento, it's ultimately outputting to HTML, TypeScript, Markdown, etc.
I'll often either use a naming convention
myfile.ts.vto
to get the Vento highlighting, ormyfile.vto.ts
to instead get TypeScript highlighting/LSP. Neither is a good tradeoff, though, since large blocks of text either will be unhighlighted or syntax errors.So, while having Vento template highlighting is better than nothing, it's not ideal for writing with. I'd love if there was some level of integration of the Vento template syntax with its existing, parent file format's text formatting in VS Code.
No idea the feasibility or difficulty of this, each file type (especially non-markup languages) may be a broader project in its own right. Feel free to close if out of scope!