1. 程式人生 > >vscode編輯器設定,禁止prettier自動格式化程式碼,不喜勿噴

vscode編輯器設定,禁止prettier自動格式化程式碼,不喜勿噴

{
  "gitlens.advanced.messages": {
    "suppressCommitHasNoPreviousCommitWarning": false,
    "suppressCommitNotFoundWarning": false,
    "suppressFileNotUnderSourceControlWarning": false,
    "suppressGitVersionWarning": false,
    "suppressLineUncommittedWarning": false,
    "suppressNoRepositoryWarning": false,
    "suppressResultsExplorerNotice": false,
    "suppressShowKeyBindingsNotice": true,
    "suppressUpdateNotice": false,
    "suppressWelcomeNotice": true
  },
  "editor.tabSize": 2,
  "terminal.integrated.shell.windows": "D:\\Program Files\\Git\\bin\\bash.exe",
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "auto"
    },
    "prettyhtml": {
      "printWidth": 300,
      "singleQuote": false,
      "wrapAttributes": false,
      "sortAttributes": false
    }
  },
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  "editor.formatOnSave": true,
  "gitlens.keymap": "alternate",
  "explorer.confirmDelete": false,
  "workbench.startupEditor": "newUntitledFile",
  "editor.minimap.enabled": false,
  "editor.fontSize": 22,
  "files.autoSave": "afterDelay",
  "explorer.confirmDragAndDrop": false,
  "workbench.colorTheme": "Quiet Light",
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "html",
    {
      "language": "vue",
      "autoFix": true
    }
  ],
  "eslint.options": {
    "plugins": [
      "html"
    ]
  },
  "workbench.iconTheme": "vscode-icons",
  "files.associations": {
    "*.cjson": "jsonc",
    "*.wxss": "css",
    "*.wxs": "javascript"
  },
  "emmet.includeLanguages": {
    "wxml": "html"
  },
  "minapp-vscode.disableAutoConfig": true,
  "git.confirmSync": false,
  "breadcrumbs.enabled": true,
  "editor.wordWrap": "on",
  "easysass.formats": [
    {
      "format": "expanded",
      "extension": ".css"
    },
    {
      "format": "compressed",
      "extension": ".min.css"
    }
  ],
  "easysass.targetDir": "./style/",
  "gitlens.views.fileHistory.enabled": true,
  "gitlens.views.lineHistory.enabled": true,
  "less.compile": {
    "compress": true, // true => remove surplus whitespace
    "sourceMap": true, // true => generate source maps (.css.map files)
    "out": "${workspaceRoot}\\style\\", // false => DON'T output .css files (overridable per-file, see below)
  },
  "editor.detectIndentation": false,
  "html.format.wrapAttributes": "auto",
  "eslint.autoFixOnSave": true,
  "terminal.integrated.rendererType": "dom",
  "search.followSymlinks": false,
}

上面是我的配置,因為常寫vue,最近更新的vscode編輯器總是自動給我格式化成pretty風格的程式碼,看著我挺尷尬,百度了半天,結合別人的配置,綜合我已有的配置,分享出來vscode的程式碼配置,不喜勿噴,

另外加點我裝的外掛截圖,本地不想儲存圖片了,放網上省點空間