天天看點

vscode 代碼風格設定

{
    "files.eol": "\n",
    "typescript.preferences.quoteStyle": "single",
    "javascript.preferences.quoteStyle": "single",
    // tab 大小為2個空格
    "editor.tabSize": 2,
    // 編輯器換行
    "editor.wordWrap": "off",
    // 儲存時格式化
    "editor.formatOnSave": false,
    // 開啟 vscode 檔案路徑導航
    "breadcrumbs.enabled": true,
    // prettier 設定語句末尾不加分号
    "prettier.semi": false,
    // prettier 設定強制單引号
    "prettier.singleQuote": true,
    // 選擇 vue 檔案中 template 的格式化工具
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    // vetur 的自定義設定
    "vetur.format.defaultFormatterOptions": {
      "js-beautify-html": {
        "wrap_attributes": "aligned-multiple"
      },
      "prettier": {
        "singleQuote": true,
        "semi": false,
        "printWidth": 100,
        "wrapAttributes": false,
        "sortAttributes": false
      }
    },
    "workbench.colorTheme": "Tomorrow Night Blue"
  }
           

繼續閱讀