VsCode 的 settings.json配置

{
" workbench.colorTheme": "Monokai",
"editor.matchBrackets": "never",
"workbench.iconTheme": "vscode-icons",
"diffEditor.ignoreTrimWhitespace": false,
// vscode默认启用了根据文件类型自动设置tabsize的选项
"editor.detectIndentation": false,
// 重新设定tabsize
"editor.tabSize": 2,
// #每次保存的时候自动格式化
"editor.formatOnSave": true,
// #去掉代码结尾的分号
"prettier.semi": false,
// #每次保存的时候将代码按eslint格式进行修复
// "eslint.autoFixOnSave": true,
// #让prettier使用eslint的代码格式进行校验
"prettier.eslintIntegration": true,
// #让函数(名)和后面的括号之间加个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "prettier",
"vetur.format.defaultFormatterOptions": {
// 自定义配置
"js-beautify-html": {
"wrap_line_length": 0, // Lines should wrap at next opportunity after this number of characters (0 disables)
"wrap_attributes": "auto", // 换行,[auto|force|force-aligned|force-expand-multiline] ["auto"]
"indent_size": 2 // 缩进大小
},
"prettier": {
"trailingComma": "es6",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
},
// 格式化styles, 需安装Manta's Stylus Supremacy插件
"stylusSupremacy.insertColons": false, // 是否插入冒号
"stylusSupremacy.insertSemicolons": false, // 是否插入分号
"stylusSupremacy.insertBraces": false, // 是否插入大括号
"stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
"stylusSupremacy.insertNewLineAroundBlocks": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"explorer.confirmDelete": false,
"files.autoSave": "afterDelay",
"git.confirmSync": false,
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"vsicons.dontShowNewVersionMessage": true,
"git.suggestSmartCommit": false,
"javascript.updateImportsOnFileMove.enabled": "always",
"files.associations": {
"*.vue": "vue"
},
"prettier.jsxSingleQuote": true,
"http.proxyAuthorization": null,
"security.workspace.trust.untrustedFiles": "open",
// #使用带引号替代双引号
"prettier.singleQuote": true,
"git.autofetch": true,
"typescript.updateImportsOnFileMove.enabled": "always",
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"explorer.confirmDragAndDrop": false,
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 200,
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"bracketPairColorizer.depreciation-notice": false,
"tabnine.experimentalAutoImports": true,
"search.followSymlinks": false,
"git.ignoredRepositories": [
"/src/config-token.js"
],
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.fontWeight": "normal",
}

posted @ 2023-03-25 10:19  紫川先生  阅读(301)  评论(0编辑  收藏  举报