Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Mustache InjectorNew to Visual Studio Code? Get it now.
Mustache Injector

Mustache Injector

hasanuzn

|
4 installs
| (1) | Free
PHP ve HTML scriptleri icinde mustache renklendirmesi
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mustache Script Injector

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.

After: The code is colorful and structured.

<script type="text/mustache">
    <div class="user-card">
        {{#users}}
            <h2>{{name}}</h2>
            <p>Email: {{email}}</p>
        {{/users}}
        
        {{^users}}
            <p>No users found.</p>
        {{/users}}
    </div>
</script>
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft