我在 Mac 上使用 Visual Studio Code 来处理 Node.js 应用程序。
有没有办法让 Visual Studio Code 将 EJS 文件识别为 HTML 标记?我在用户首选项中没有看到任何文件/方案关联。
事实上,你可以。
正如 Andre 指出的那样,现在您可以在工作区设置中执行此操作。转到 Visual Studio Code 设置:File >> Preferences >> User Settings
// Place your settings in this file to overwrite the default settings
{
// Configure file associations to languages (e.g. "*.extension": "html"). These have precedence over the default associations of the languages installed.
"files.associations": {"*.ejs": "html"}
}
单击 VS Code 窗口底部的“纯文本”选项卡并将其更改为HTML
,截图如下:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)