Add Javascript syntax highlighting for Alpine JS x- attributes by adding a comment
x-data="{
// javascript
open: false
}"
It also adds normal greyed-out comments inside the x- attributes that don't trigger the Javascript syntax highlighting.
x-data="{
// just a grey comment
open: false
}"
// js
// javascript
// MARK: js
// MARK: javascript
// #region js
// #region javascript
/* js */
/* javascript */
/* MARK: js */
/* MARK: javascript */
/* #region js */
/* #region javascript */
⚠️ Section headers don't show in the minimap
Vscode support for section headers triggered in embedded languages is spotty / not well documented.
Supported Files
- Html
- Jinja
- Liquid
- Nunjucks
- Php
- Twig
Credit
This is a fork of Sperovita/alpinejs-syntax-highlight
Based off of textmate syntaxes from Vetur
| |