Skip to content

Possible to use on other grammar instead of HTML? #11

@sarim

Description

@sarim

from readme:

provide syntax highlighting for Nunjucks tags, filers, and variables which are injected into the default html grammar

So I'm making a code generator from openapi definition. I'm generating typescript files, so my files are named operation.ts.njk etc. Now obviously the base code is typescript, then I have nunjucks sprinkled inside it. Can I make the base grammar typescript and not html?

Actually I face this issue often, something.html.twig, works kinda okey with a twig extension, but making a php/rust/go file with twig, it craps out. So this question is kinda broad, is it possible to for [Template Engine] Extensions to inject their tags, filers, and variables into arbitrary user selectable grammar?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions