Created
October 23, 2020 23:14
-
-
Save command-tab/f71964ad47e3ab78cd9deef42a5d85dd to your computer and use it in GitHub Desktop.
Install the pug tmbundle, then edit the built-in HTML bundle to append this above the style pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ begin = '(^[ \t]+)?(?=<(?i:template lang="pug")(?!-))'; | |
end = '(?!\G)([ \t]*$\n?)?'; | |
beginCaptures = { 1 = { name = 'punctuation.whitespace.embedded.leading.html'; }; }; | |
endCaptures = { 1 = { name = 'punctuation.whitespace.embedded.trailing.html'; }; }; | |
patterns = ( | |
{ name = 'meta.embedded.block.html'; | |
begin = '(?i)(<)(template)(?=\s|/?>)'; | |
end = '(?i)((<)/)(template)\s*(>)'; | |
beginCaptures = { | |
0 = { name = 'meta.tag.metadata.pug.start.html'; }; | |
1 = { name = 'punctuation.definition.tag.begin.html'; }; | |
2 = { name = 'entity.name.tag.html'; }; | |
}; | |
endCaptures = { | |
0 = { name = 'meta.tag.metadata.pug.end.html'; }; | |
1 = { name = 'punctuation.definition.tag.begin.html'; }; | |
2 = { name = 'source.pug'; }; | |
3 = { name = 'entity.name.tag.html'; }; | |
4 = { name = 'punctuation.definition.tag.end.html'; }; | |
}; | |
patterns = ( | |
{ name = 'meta.tag.metadata.pug.start.html'; | |
begin = '\G'; | |
end = '(>)'; | |
captures = { 1 = { name = 'punctuation.definition.tag.end.html'; }; }; | |
patterns = ( { include = '#attribute'; } ); | |
}, | |
{ name = 'source.pug'; | |
begin = '(?!\G)'; | |
end = '(?=</(?i:template))'; | |
patterns = ( { include = 'source.pug'; } ); | |
} | |
); | |
}, | |
); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment