{
// 使用2个空格作为tab,并将对齐基准线设置为2个字符test
"editor.tabSize": 2,
// 打开对vue的lint,并自动fix
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
}
],
// 对于.vue文件,关闭prettier,交给eslint fix
"vetur.format.defaultFormatter.css": "none",
"vetur.format.defaultFormatter.html": "none",
"vetur.format.defaultFormatter.js": "none",
"vetur.format.defaultFormatter.less": "none",
"vetur.format.defaultFormatter.postcss": "none",
"vetur.format.defaultFormatter.scss": "none",
"vetur.format.defaultFormatter.stylus": "stylus-supremacy",
"vetur.format.defaultFormatter.ts": "none",
/* stylus 配置 start */
// 是否插入冒号
"stylusSupremacy.insertColons": false,
// 是否插入分号
"stylusSupremacy.insertSemicolons": false,
// 是否插入大括号
"stylusSupremacy.insertBraces": false,
// import之后是否换行
"stylusSupremacy.insertNewLineAroundImports": false,
// 两个选择器中是否换行
"stylusSupremacy.insertNewLineAroundBlocks": false,
"diffEditor.renderSideBySide": false,
// "eslint.autoFixOnSave": true,
"eslint.migration.2_x": "off",
"window.zoomLevel": 0,
"git.autofetch": true,
"diffEditor.ignoreTrimWhitespace": false,
"eslint.codeAction.showDocumentation": {
"enable": true
}
/* stylus 配置 end */
}
以下内容转载自https://blog.csdn.net/qwe435541908/article/details/100706889
{
/* 编辑器配置 */
//"editor.fontSize": 20,
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.quickSuggestions": {
"strings": true
},
"editor.formatOnType": false,
"editor.renderControlCharacters": true,
"editor.tabCompletion": "on",
"editor.hideCursorInOverviewRuler": true,
"editor.tabSize": 2,
"editor.renderWhitespace": "all",
"editor.mouseWheelZoom": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"editor.fontLigatures": true,
"editor.foldingStrategy": "auto",
"editor.matchBrackets": true,
//"editor.fontFamily": "Consolas, Inconsolata, Source Code Pro, Monaco, monospace, Courier New, Fira Code",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
/* 文件头配置 */
"fileheader.customMade": {
"Author": "xxx",
// "LastEditTime":"Do not edit",
"Description": "",
"Position": "",
"Date": "Do not edit",
"LastEditors": "xxx"
},
"fileheader.configObj": {
"autoAdd": false, // 默认开启
},
/* emmet自动补全配置 */
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"vue-html": "html",
"javascript": "javascriptreact",
"vue": "html"
},
"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html"
},
"emmet.showSuggestionsAsSnippets": true,
/* eslint插件配置 */
"eslint.enable": true,
//"eslint.autoFixOnSave": true,//此选项最新版已被editor包含,变为editor.codeActionsOnSave
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true//eslint保存文件时自动修复
},
"eslint.alwaysShowStatus": true,
// "eslint.nodePath": "c:\\Users\\node_modules",//这个会防止项目打开其他项目文件时路径改变,导致eslint不会出现提示,最好将此设置为工作区中
"eslint.run": "onType",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"vue",
"jsx"
]
"eslint.options": {
"extensions": [
".js",
".vue"
]
},
/* 工作区配置 */
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "newUntitledFile",
"workbench.colorCustomizations": {},
"workbench.statusBar.visible": true,
"workbench.editor.highlightModifiedTabs": true,
"workbench.colorTheme": "One Monokai",
"breadcrumbs.enabled": true,
/* bookmarks标签管理插件配置 */
"bookmarks.saveBookmarksInProject": true,
"bookmarks.navigateThroughAllFiles": true,
"auto-close-tag.SublimeText3Mode": true,
"auto-close-tag.fullMode": true,
/* prettier格式化插件配置 */
"prettier.jsxBracketSameLine": true,
"prettier.semi": false, // 句尾添加分号
"prettier.printWidth": 150,
"prettier.singleQuote": false,
/* vetur插件配置 */
"vetur.validation.template": true, //eslint-plugin-vue校验打开
"vetur.format.defaultFormatter.js": "vscode-typescript",//vue文件中js默认格式化
"vetur.format.defaultFormatter.html": "js-beautify-html",//vue中格式化html
"vetur.format.defaultFormatterOptions": {//vue文件格式化配置
"js-beautify-html": {
"wrap_line_length": 150,
"wrap_attributes": "auto",
"end_with_newline": false
},
"prettyhtml": {
"printWidth": 150,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
/* git svn配置 */
// "git.confirmSync": false,
// "git.enableSmartCommit": true,
// "svn.enableProposedApi": "argument",
// "TortoiseSVN.tortoiseSVNProcExePath": "C:\\\\Program Files\\\\TortoiseSVN\\\\bin\\\\TortoiseProc.exe",
// "showGitMetrics": false,
/* 终端 */
"terminal.integrated.fontFamily": "Consolas, Source Code Pro, Inconsolata, Monaco, monospace, Courier New, Fira Code",
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.rendererType": "dom",
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.copyOnSelection": true,
"terminal.integrated.fontSize": 15,
/* sync同步插件 */
"sync.quietSync": true,
"sync.syncExtensions": true,
"sync.removeExtensions": false,
"sync.gist": "6212eae319f3a46e74cc56fe56b653c2",
"sync.forceUpload": true,
/* 遥测设置 */
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
/* 文件设置 */
"files.trimTrailingWhitespace": true,
"files.exclude": {
// "node_modules/": true
},
/* 调试配置 */
"debug.console.fontFamily": "Consolas, Source Code Pro, Inconsolata, Monaco, monospace, Courier New, Fira Code",
"debug.console.fontSize": 15,
/* 搜索配置 */
"search.followSymlinks": false,
"search.showLineNumbers": true,
/* liveServer插件配置 */
"liveServer.settings.proxy": {
"enable": false,
"baseUri": "/api",
"proxyUri": "http://api.zhuishushenqi.com"
},
/* 主题配置 */
"material-icon-theme.hidesExplorerArrows": false,
"material-icon-theme.folders.theme": "specific",
"material-icon-theme.opacity": 1,
"material-icon-theme.activeIconPack": "vue_vuex",
"material-icon-theme.folders.color": "#90a4ae",
"material-icon-theme.saturation": 1,
/* vue-format插件配置 */
"vue-format.js-beautify": {
"indent_size": "editor.tabSize",
"indent_char": " ",
"indent_with_tabs": false,
"brace-style": "collapse,preserve-inline",
"space_after_anon_function": true,
"css": {},
"js": {},
"html": {
"force_format": [
"template"
]
}
},
/* beautify插件配置 */
"beautify.config": {
"brace-style": "collapse,preserve-inline",
"indent_size": "2",
"indent_char": " ",
"indent_with_tabs": false,
"space_after_anon_function": true,
},
/* js默认格式化配置 */
"[javascript]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
/* peacock插件边框颜色配置 */
"peacock.favoriteColors": [
{"name": "Angular Red","value": "#b52e31"},
{"name": "Auth0 Orange","value": "#eb5424"},
{"name": "Azure Blue","value": "#007fff"},
{ "name": "C# Purple", "value": "#68217A" },
{ "name": "Gatsby Purple", "value": "#639" },
{ "name": "Go Cyan", "value": "#5dc9e2" },
{ "name": "Java Blue-Gray", "value": "#557c9b" },
{ "name": "JavaScript Yellow", "value": "#f9e64f" },
{ "name": "Mandalorian Blue", "value": "#1857a4" },
{ "name": "Node Green", "value": "#215732" },
{ "name": "React Blue", "value": "#00b3e6" },
{ "name": "Something Different", "value": "#832561" },
{ "name": "Vue Green", "value": "#42b883" }
],
}