{
"workbench.colorTheme": "Default Dark+",
"editor.fontSize": 18,
"editor.tabSize": 2,
// vscode 默认启用了"editor.detectIndentation": true”根据文件类型自动设置tabsize的选项
"editor.detectIndentation": false,
//回车自动格式化
"editor.formatOnType": true,
// vetur插件的配置开始(编辑器中需要安装vetur插件才能生效)
"vetur.format.defaultFormatterOptions": {
"prettier": {
"semi": true, // 去掉末尾分号
"singleQuote": true // 使用单引号
},
"wrap_attributes": "force-aligned"
},
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.validation.template": false,
// vetur插件的配置结束
// Power Mode 插件的配置开始((编辑器中需要安装Power Mode 插件插件才能生效))
//是否开启
"powermode.enabled": true,
//效果样式 “水花-particles”, “烟花-fireworks”, “火焰-flames”, “雪花-magic”, “幽灵-clippy”, “激光-simple-rift”, “大激光-exploding-rift”
"powermode.presets": "flames",
//时间间隔
"powermode.combo.timeout": 5,
//设置为false以在键入时禁用抖动
"powermode.shake.enabled": false,
"powermode.combo.counterEnabled": "hide",
"powermode.combo.timerEnabled": "hide",
// Power Mode 插件的配置结束
// background插件设置开始(编辑器中需要安装background插件才能生效)
"background.enabled": true, //是插件是否启用,我们要启用。
"background.useDefault": false, //是否使用默认图片,改成false,不默认,我们要设置自己想要的
"background.customImages": [ //设置图片的路径,照着格式改就行,最多三张。
"file:///D:/desktopImg/静态壁纸/wallhaven-wq7pxp.png",
"file:///D:/desktopImg/静态壁纸/wallhaven-wq7pxp.png",
"file:///D:/desktopImg/静态壁纸/wallhaven-wq7pxp.png",
],
"background.style": {
"content": "''",
"pointer-events": "none",
"position": "absolute",
"top": "0",
// "right": "0",
// "bottom": "15%",
"left": "3%",
"background-size": "45%",
"z-index": "99999",
"width": "100%",
"height": "100%",
"background-repeat": "no-repeat",
"opacity": 0.3 //不透明度
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"typescript.preferences.quoteStyle": "single",
// "[javascript]": {
// "editor.defaultFormatter": "esbenp.prettier-vscode"
// },
// background插件设置结束
// 每次代码保存的时候,自动使用eslint+prettier 格式化代码
// 前提是编辑中需要安装eslint + prettier + Prettier ESLint插件
// 保存文档时自动格式化
"editor.formatOnSave": true,
// 保存时按照哪个规则进行格式化
// "eslint.autoFixOnSave": true, 这个设置被废弃了,使用下面的editor.codeActionsOnSave的配置
"editor.codeActionsOnSave": {
// "source.fixAll": true,
"source.fixAll.eslint": true
// "source.fixAll.prettier": true
},
"eslint.format.enable": true,
// "[javascript]": {
// // "editor.defaultFormatter": "dbaeumer.vscode-eslint"
// // "editor.defaultFormatter": "esbenp.prettier-vscode"
// "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
// // 这里也可以使用 "editor.defaultFormatter": "esbenp.prettier-vscode",但是要保证安装了prettier插件
// // 这样使用快捷键格式化 command + k \ command + f,可以进行选择部分代码进行格式化
// },
"eslint.enable": true,
// esint规则需要检验哪些文件
"eslint.validate": [
"javascript",
"javascriptreact",
"vue",
"typescript",
"typescriptreact"
],
// 代码的格式化风格是prettier格式的
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
}