settings.json设置

这篇文章展示了VSCode的详细配置,包括Git的交互设置、自动刷新禁用、文件关联、Emmet支持、路径导航、Prettier与ESLint的格式化与检查规则、代码保存时的自动修复、编辑器显示和缩进设置,以及各种语言的默认formatter和错误处理策略。这些设置旨在优化开发环境,提升编码效率和代码质量。
摘要由CSDN通过智能技术生成
{
  "git.allowForcePush": true,
  "[javascriptreact]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "open-in-browser.default": "Google Chrome",
  "git.autorefresh": false,
  "svn.default.encoding": "",
  "js/ts.implicitProjectConfig.experimentalDecorators": true,
  "workbench.iconTheme": "material-icon-theme",
  "files.associations": {
    "*.cjson": "jsonc",
    "*.wxss": "css",
    "*.wxs": "javascript",
    "*.js": "javascriptreact"
  },
  "emmet.includeLanguages": {
    "wxml": "html",
    "axml": "xml"
  },
  "minapp-vscode.disableAutoConfig": true,
  "breadcrumbs.enabled": true, // 开启 vscode 文件路径导航
  "prettier.semi": false, // prettier 设置语句末尾不加分号
  "prettier.singleQuote": true, // prettier 设置强制单引号
  "prettier.trailingComma": "none", // 去掉结尾的逗号
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.options": {
    "extensions": [
      ".js",
      ".vue",
      ".jsx",
      ".json",
      ".html"
    ],
    "vue/html-self-closing": [
      "error",
      {
        "html": {
          "void": "never",
          "normal": "always",
          "component": "always"
        },
        "svg": "always",
        "math": "always"
      }
    ]
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "vue-html",
    "html",
    "vue",
  ],
  "eslint.run": "onSave",
  "editor.suggestSelection": "first",
  "workbench.colorCustomizations": {
    "editor.selectionBackground": "#e29607f8"
  },
  // vscode默认启用了根据文件类型自动设置tabsize的选项
  "editor.detectIndentation": false, // 检测缩进
  "editor.tabSize": 2, // tab 空格
  "editor.formatOnSave": false, // 保存时格式化 于vue中eslint冲突
  // "[javascript]": {
  //   "editor.formatOnSave": true,
  //   "editor.defaultFormatter": "esbenp.prettier-vscode"
  // },
  // "[json]": {
  //   "editor.defaultFormatter": "esbenp.prettier-vscode"
  // },
   "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // "[vue]": {
  //   "editor.defaultFormatter": "octref.vetur"
  // },
  // "vetur.ignoreProjectWarning": true,
  // "vetur.format.defaultFormatter.html": "js-beautify-html",
  // "vetur.format.defaultFormatterOptions": {
  //   "js-beautify-html": {
  //     "wrap_attributes": "aligned-multiple"
  //   },
  //   "prettier": {
  //     "singleQuote": true,
  //     "semi": false,
  //     "printWidth": 100,
  //     "wrapAttributes": false,
  //     "sortAttributes": false
  //   }
  // },
  "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "explorer.confirmDelete": false,
  "explorer.confirmDragAndDrop": false,
  "liveServer.settings.donotShowInfoMsg": true,
  "diffEditor.ignoreTrimWhitespace": false,
  "fileheader.cursorMode": {
    "description": "",
    "param": "",
    "return": ""
  },
  "fileheader.customMade": {
    "Author": "zhouyx",
    "Date": "Do not edit",
    "LastEditTime": "Do not edit",
    "LastEditors": "zhouyx",
     "FilePath": "Do not edit", // 设置后,默认生成文件相对于项目的路径
    "程序猿": "佛祖保佑     永不宕机     永无BUG"
  },
  "fileheader.configObj": {
    "createFileTime": true,
    "autoAdd": true,
    "language": {
      "languagetest": {
        "head": "/$$",
        "middle": " $ @",
        "end": " $/"
      }
    },
    "autoAddLine": 100,
    "autoAlready": true,
    "annotationStr": {
      "head": "/*",
      "middle": " * @",
      "end": " */",
      "use": true
    },
    "headInsertLine": {
      "php": 2,
      "sh": 2
    },
    "beforeAnnotation": {
      "文件后缀": "该文件后缀的头部注释之前添加某些内容"
    },
    "afterAnnotation": {
      "文件后缀": "该文件后缀的头部注释之后添加某些内容"
    },
    "specialOptions": {
      "特殊字段": "自定义比如LastEditTime/LastEditors"
    },
    "switch": {
      "newlineAddAnnotation": true
    },
    "supportAutoLanguage": [],
    "prohibitAutoAdd": [
      "json"
    ],
    "folderBlacklist": [
      "node_modules",
      "文件夹禁止自动添加头部注释"
    ],
    "prohibitItemAutoAdd": [
      "项目的全称, 整个项目禁止自动添加头部注释, 可以使用快捷键添加"
    ],
    "moveCursor": true,
    "dateFormat": "YYYY-MM-DD HH:mm:ss",
    "atSymbol": [
      "@",
      "@"
    ],
    "atSymbolObj": {
      "文件后缀": [
        "头部注释@符号",
        "函数注释@符号"
      ]
    },
    "colon": [
      ": ",
      ": "
    ],
    "colonObj": {
      "文件后缀": [
        "头部注释冒号",
        "函数注释冒号"
      ]
    },
    "filePathColon": "路径分隔符替换",
    "showErrorMessage": false,
    "writeLog": false,
    "wideSame": false,
    "wideNum": 13,
    "functionWideNum": 0,
    "CheckFileChange": false,
    "createHeader": true,
    "useWorker": false,
    "designAddHead": false,
    "headDesignName": "random",
    "headDesign": false,
    "cursorModeInternal": false,
    "openFunctionParamsCheck": true,
    "functionParamsShape": "normal",
    "functionBlankSpace": 0
  },
  "security.workspace.trust.untrustedFiles": "newWindow",
  "vsicons.dontShowNewVersionMessage": true,
  "editor.rulers": [],
  "git.enableSmartCommit": true,
  "htmlhint.options": {
    "tagname-lowercase": true,
    "attr-lowercase": true,
    "attr-value-double-quotes": true,
    "doctype-first": false,
    "tag-pair": true,
    "spec-char-escape": false,
    "id-unique": true,
    "src-not-empty": true,
    "attr-no-duplication": true,
    "title-require": false
  },
  "vsicons.associations.files": [
    {
      "icon": "xml",
      "extensions": [
        "axml"
      ],
      "format": "svg"
    },
    {
      "icon": "css",
      "extensions": [
        "acss"
      ],
      "format": "svg"
    }
  ],
  "editor.semanticTokenColorCustomizations": {},
  "editor.language.brackets": [

    []
  ],
  "editor.suggest.snippetsPreventQuickSuggestions": false,
  "editor.fontLigatures": false,
  "editor.quickSuggestions": {
    "strings": true,
    "other": true,
    "comments": true,
  },
  "editor.indentSize": "tabSize"
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

周亚鑫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值