The grammar treats .zen files as HTML-first documents. Standard HTML tags are recognized and highlighted with entity.name.tag.html.zen scope.
Embedded Languages
<script> blocks use JavaScript/TypeScript highlighting with additional Zenith keyword recognition
<style> blocks use standard CSS highlighting
Expression Syntax
Single brace expressions {...} are recognized in HTML content and attributes. The content is highlighted as JavaScript. Double braces {{}} are NOT supported per Zenith syntax rules.
Component Tags
Capitalized tags like <DefaultLayout> are recognized as Zenith components and receive entity.name.tag.component.zen scope for distinct styling.
Zenith Keywords
The following Zenith-specific keywords are recognized in script blocks:
state - reactive state declaration
zenOnMount - lifecycle hook
zenOnDestroy - lifecycle hook
zenOnUpdate - lifecycle hook
zenEffect - effect declaration
REDCMD Compatibility
This grammar is authored following TextMate/REDCMD patterns: