Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit parent file type highlighting (like .html, .ts, .md) #5

Open
mattvr opened this issue Apr 6, 2024 · 2 comments
Open

Inherit parent file type highlighting (like .html, .ts, .md) #5

mattvr opened this issue Apr 6, 2024 · 2 comments

Comments

@mattvr
Copy link

mattvr commented Apr 6, 2024

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, or myfile.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!

@oscarotero
Copy link
Collaborator

oscarotero commented Apr 7, 2024

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

@noelforte
Copy link

noelforte commented May 16, 2024

Came across this while playing around with Vento. I'd definitely love to see the extra HTML goodies like the liquid extension provides!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants