【问题标题】:Editing Prettier options in Vscode在 Vscode 中编辑 Prettier 选项
【发布时间】:2020-04-16 07:19:48
【问题描述】:

我需要让 Prettier 将 .tpl 文件格式化为 HTML 格式。 I've found on GitHub这段代码谁来做:

 overrides: [
 {
   files: '*.html.tpl',
   options: { parser: 'html' },
 },
],

我应该如何实现它?

【问题讨论】:

标签: html visual-studio-code prettier


【解决方案1】:

转到文件 -> 首选项 -> 设置。

在搜索框中,搜索“Associations”,然后点击“Edit on settings.json”。

将以下内容添加到 JSON 文件中:

"files.associations": {
  "*.html.tpl": "html"
}

【讨论】:

    猜你喜欢
    • 2021-10-26
    • 2020-01-26
    • 1970-01-01
    • 2019-07-09
    • 2019-07-12
    • 2020-06-22
    • 1970-01-01
    • 2019-11-22
    • 2020-10-17
    相关资源
    最近更新 更多