MXOXW

Life always finds a way.

VS Code自定义高亮

| Comments

html里自定义模版,不能自动识别高亮,可以修改文件..\Microsoft VS Code\resources\app\extensions\html\syntaxes\html.json

v1.22 ..\Microsoft VS Code\resources\app\extensions\html\syntaxes\html.tmLanguage.json

1
2
3
4
5
6
7
8
9
10
11
12
13
"begin": "(?=(?i:type\\s*=\\s*('|\"|)(text/(x-handlebars|(x-(handlebars-)?|ng-|ath-)?template|html)[\\s\"'>])))",
"end": "((<))(?=/(?i:script))",
"endCaptures": {
"0": {
"name": "meta.tag.metadata.script.html"
},
"1": {
"name": "punctuation.definition.tag.begin.html"
},
"2": {
"name": "text.html.basic"
}
},

可以支持ath-template模版高亮

1
2
3
4
5
<script type="text/ath-template">
<div class="txt">
Hello World!
</div>
</script>

评论