A lightweight VS Code extension that adds proper syntax highlighting for Mustache templates embedded within <script> tags in HTML and PHP files.
VS Code typically treats <script type="text/mustache"> blocks as plain text. This extension injects a grammar rule to highlight HTML tags normally while coloring Mustache variables ({{...}}) in a distinct Light Blue, making your templates readable and easy to debug.
🚀 Features
Seamless Injection: Works automatically inside <script type="text/mustache"> tags.
Dual Support: Supports both .html and .php files.
Smart Highlighting:
Standard HTML tags (div, span, etc.) retain their theme colors.
Script attributes (id, class, type) retain their standard highlighting.
Mustache tags ({{variable}}, {{#section}}) are highlighted in Light Blue.
Auto-Closing: Typing {{ automatically inserts the closing }}.
📸 Usage
Simply install the extension and open any HTML or PHP file.
Before:
The code inside the script tag looks like plain white/grey text.