{
"window.openFoldersInNewWindow": "on",
"editor.fontSize": 14,
"editor.fontLigatures": false,
"editor.fontWeight": "normal",
"editor.minimap.enabled": true,
"editor.detectIndentation": false,
"editor.wordWrap": "on",
"editor.renderWhitespace": "none",
"editor.snippetSuggestions": "top",
"editor.suggestSelection": "first",
"editor.renderLineHighlight": "all",
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
// 开启自动保存修复
"source.fixAll.eslint": true,
//"source.fixAll.markdownlint": true
},
// 默认使用prettier格式化支持的文件
"editor.defaultFormatter": "esbenp.prettier-vscode",
// 修改注释颜色
"editor.tokenColorCustomizations": {
"comments": {
"fontStyle": "bold",
"foreground": "#12a701"
}
},
// Workbench
"workbench.statusBar.visible": true,
"workbench.activityBar.visible": true,
"workbench.editor.highlightModifiedTabs": true,
"workbench.sideBar.location": "right",
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "none",
// Terminal
"terminal.integrated.fontFamily": "Hack Nerd Font",
// git
"git.autofetch": true,
"git.enableSmartCommit": true,
"git.confirmSync": false,
"git.ignoreMissingGitWarning": true,
"git.openRepositoryInParentFolders": "never",
//python
"python.formatting.provider": "yapf",
"python.linting.enabled": true,
"python.linting.pylintArgs": [
"--rcfile=${workspaceFolder}/.pylintrc",
],
"python.formatting.yapfArgs": [
"--max-line-length=248",
],
"[python]": {
"editor.formatOnType": true,
"editor.defaultFormatter": "ms-python.python",
},
// Golang
"go.docsTool": "gogetdoc",
"go.formatTool": "gofmt",
"go.lintTool": "golint",
"go.inferGopath": true,
"go.gotoSymbol.includeGoroot": true,
"go.toolsManagement.autoUpdate": true,
// goStructTag插件
"goStructTag.tagType": "lowerCamelCase",
// Eslint插件配置
// 界面配置路径 Extensiosn -> ESlint
"eslint.format.enable": true, // 设置是否把ESlint作为一个格式化器,true表示启用
// Vetur插件配置
// 让vetur使用vs自带的js格式化工具
// uni-app和vue 项目使用
"vetur.format.enable": true, // 设置是否禁用插件格式化功能 // 默认为true,即开启
"vetur.format.defaultFormatter.css": "prettier", // 设置css代码(<style>包含的代码块)默认格式化器
"vetur.format.defaultFormatter.sass": "sass-formatter",
"vetur.format.defaultFormatter.postcss": "prettier",
"vetur.format.defaultFormatter.scss": "prettier",
"vetur.format.defaultFormatter.less": "prettier",
"vetur.format.defaultFormatter.stylus": "stylus-supremacy",
// 设置html代码(<template>包含的代码块)默认格式化器
"vetur.format.defaultFormatter.html": "prettyhtml",
// 设置js代码<script>包含的代码块)默认格式化器
"vetur.format.defaultFormatter.js": "vscode-typescript",
"javascript.format.semicolons": "remove",
// 设置vetur默认使用 prettier格式化代码
"vetur.format.defaultFormatter.ts": "prettier",
"vetur.format.defaultFormatterOptions": {
"prettyhtml": {
"printWidth": 120
},
"prettier": {
"singleQuote": true,
"proseWrap": "never",
"printWidth": 120
}
},
// 设置tab键占用的空格数,该配置将被所有格式化器继承
"vetur.format.options.tabSize": 2,
// 设置是否使用tab键缩进 默认false,即不使用,该配置将被所有格式化器继承
"vetur.format.options.useTabs": false,
// 控制是否忽略关于vscode项目配置错误的告警,默认为false,即不忽略
"vetur.ignoreProjectWarning": true,
// 配置文件类型识别
"files.associations": {
"*.js": "javascript",
"*.json": "jsonc",
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"*.py": "python"
},
"extensions.ignoreRecommendations": false,
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.hg": true,
"**/.svn": true,
"**/CVS": true,
"**/node_modules": false,
"**/tmp": true
},
// Prettier插件配置
// 设置是否开启prettier插件,默认为true,即开启
"prettier.enable": true,
// 设置是否在每行末尾添加分号,默认为 true
"prettier.semi": false,
// 设置格式化时,保持单引号,如果设置为true,则单引号会自动变成双引号
"prettier.singleQuote": true,
// 设置每个tab占用多少个空格
"prettier.tabWidth": 2,
// 设置每行可容纳字符数
"prettier.printWidth": 120,
// 设置是否使用tab键缩进行,默认为false,即不使用
"prettier.useTabs": false,
// 在对象,括号与文字之间加空格 true - Example: { foo: bar } false - Example: {foo: bar}, 默认为true
"prettier.bracketSpacing": true,
// 设置在jsx中,是否把'>' 单独放一行,默认为false,即单独放一行
//"prettier.jsxBracketSameLine": true,
// 函数前面加个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
// 匿名函数空格处理
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
// 设置各种代码的默认格式化器//以下为默认配置
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[scss]": {
"editor.suggest.insertMode": "replace"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[go.sum]": {
"editor.defaultFormatter": "golang.go"
},
"[go]": {
"editor.defaultFormatter": "golang.go",
"editor.insertSpaces": false,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.suggest.snippetsPreventQuickSuggestions": false
},
"[markdown]": {
"editor.wordWrap": "on",
"editor.formatOnSave": false,
"editor.quickSuggestions": {
"other": "on",
"comments": "on",
"strings": "on"
}
},
"redhat.telemetry.enabled": true,
"explorer.confirmDelete": false,
"security.workspace.trust.untrustedFiles": "newWindow",
"terminal.integrated.enableMultiLinePasteWarning": false,
"insertDateString.format": "YYYY-MM-DDThh:mm:ssZZZ",
"workbench.colorTheme": "Atom One Dark",
"update.showReleaseNotes": false,
"remote.SSH.remotePlatform": {},
"lldb.suppressUpdateNotifications": true,
"translator.captureWord": true,
}