Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio code HTML文件的VS代码格式问题_Visual Studio Code_Prettier - Fatal编程技术网

Visual studio code HTML文件的VS代码格式问题

Visual studio code HTML文件的VS代码格式问题,visual-studio-code,prettier,Visual Studio Code,Prettier,我们使用VS代码的工作区配置和一些插件: 角度语言服务 角度片段版本11 Prettier Plus(svipas.Prettier Plus) 这是一个角度为10的项目,问题是我的插值在保存期间没有在括号之间获得空格,管道也没有。示例: <ng-template // stuff [ngTemplateOutletContext]="{ myObservable: myObservable$|async, myObservable: myObservable$|

我们使用VS代码的工作区配置和一些插件: 角度语言服务 角度片段版本11 Prettier Plus(svipas.Prettier Plus)

这是一个角度为10的项目,问题是我的插值在保存期间没有在括号之间获得空格,管道也没有。示例:

<ng-template
  // stuff
  [ngTemplateOutletContext]="{
  myObservable: myObservable$|async,
  myObservable: myObservable$|async
}"
  #subscriptions
>
以下是我的用户设置:

{
  "editor.formatOnSave": true,
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "editor.detectIndentation": false,
  "prettier.singleQuote": true,
  "prettier.trailingComma": "none",
  // Exclude third party modules and build artifacts from the editor watchers/searches.
  "files.watcherExclude": {
    "**/.git/objects/**": true,
    "**/.git/subtree-cache/**": true,
    "**/node_modules/**": true,
    "**/bazel-out/**": true,
    "**/dist/**": true,
    "**/aio/src/generated/**": true
  },
  "search.exclude": {
    "**/node_modules": true,
    "**/bower_components": true,
    "**/bazel-out": true,
    "**/dist": true,
    "**/aio/src/generated": true
  },
  "git.ignoreLimitWarning": true,
  "[html]": {
    "editor.defaultFormatter": "svipas.prettier-plus"
  },
  "[scss]": {
    "editor.defaultFormatter": "svipas.prettier-plus"
  },
  "[json]": {
    "editor.defaultFormatter": "svipas.prettier-plus"
  },
  "[typescript]": {
    "editor.codeActionsOnSave": {
      "source.organizeImports": true,
      "source.fixAll.eslint": true
    },
    "editor.defaultFormatter": "svipas.prettier-plus"
  }
}
{
  "workbench.iconTheme": "material-icon-theme",
  "sonarlint.ls.javaHome": "c:\\Users\\eosc\\.vscode\\extensions\\sonarsource.sonarlint_managed-jre\\jre\\jdk-11.0.10+9-jre",
  "[jsonc]": {
    "editor.defaultFormatter": "svipas.prettier-plus"
  },
}
这是一个小问题,直到我们开始代码审查,当其他人检查我的模板时,他们的漂亮的模板修复了这些问题,代码审查中的很多事情都发生了变化,这可能会增加代码行,这些变化可能会夺走审查的注意力。我知道它很小,但它困扰着我,它只影响HTML文件,其他所有文件都按预期工作。有人知道我应该从哪里开始修理这个吗

{
  "workbench.iconTheme": "material-icon-theme",
  "sonarlint.ls.javaHome": "c:\\Users\\eosc\\.vscode\\extensions\\sonarsource.sonarlint_managed-jre\\jre\\jdk-11.0.10+9-jre",
  "[jsonc]": {
    "editor.defaultFormatter": "svipas.prettier-plus"
  },
}