vs code识别ejs模版为html语法
1、 编辑Visual Studio Code.app/Contents/Resources/app/extensions/html/package.json为如下:
{
"name": "html",
"version": "0.1.0",
"publisher": "vscode",
"engines": { "vscode": "*" },
"contributes": {
"languages": [{
"id": "html",
"extensions": [ ".html", ".htm", ".shtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm",".ejs"],
"aliases": [ "HTML", "htm", "html", "xhtml","ejs"],
"mimetypes": ["text/html", "text/x-jshtm", "text/template", "text/ng-template"]
}],
"grammars": [{
/* "language": "html", not yet enabled*/
"scopeName": "text.html.basic",
"path": "./syntaxes/HTML.plist"
}]
}
}
2、重启vscode