This package consumes the following services:
language-vento
Pulsar language support for Vento, the JavaScript templating engine.
Provides an HTML (Vento) grammar for using Vento with HTML. (If you want other grammars for other types of files, please file an issue.)
Features
Injections
As much syntax-highlighting as possible is handled by the JavaScript injections. If there’s a place in Vento where any arbitrary JavaScript is permitted, then this package defers to the JavaScript grammar.
Anything outside of Vento tags is handled by injecting the HTML grammar.
Snippets
Every snippet has two versions: a “normal” version that emits {{
/}}
(or its equivalent) as tag delimiters, and a “trimmed” version that emits {{-
/-}}
(or its equivalent) as tag delimiters.
In nearly all cases, the trigger for the latter matches the trigger for the former, but with -
at the end. For instance: for
will trigger a for-loop snippet, but for-
will trigger the same snippet with whitespace-trimming delimiters.
The normal “output” tag is one exception. =
is the tab trigger for inserting regular delimiters, but -
is the tab trigger for inserting whitespace-trimming delimiters.
Future enhancements
- Perhaps add support for arbitrary plugins that add new syntax.
- Instead of having two versions of each snippet, maybe have the whitespace-trimming behavior of snippets be configurable? (A bit hacky, but could be done.)