configuration
首先下载相关软件
git:https://git-scm.com/download/win
node:https://nodejs.org/download/release/
vscode:https://code.visualstudio.com/
chrome:https://www.google.cn/intl/zh-CN/chrome/
设置谷歌为默认浏览器,并配置相关扩展(随意添加)
https://chrome.zzzmh.cn/index#/index
配置 vscode 插件
Chinese (Simplified) (简体中文)
别名路径跳转
ChatGPT中文版
Auto Close Tag
Color Highlight
ESLint (可有可无)
formate-custom: CSS/LESS/SCS
Git History
GitLens — Git supercharged
Image preview
javascript console utils
open in browser
Path Intellisense
Power Mode
Prettier - Code formatter
Vetur
Vue VSCode Snippets
settings.json :
{
// vscode默认启用了根据文件类型自动设置tabsize的选项
"editor.detectIndentation": false, // 重新设定tabsize
"editor.tabSize": 2,
"editor.wordWrap": "on", //超出页面自动换行
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"eslint.validate": ["javascript", "javascriptreact", "vue"],
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}, // 默认使用prettier格式化支持的文件
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
"prettier": {
// 结尾无分号
"semi": false, // 超过140个字符换行
"printWidth": 140, // 使用单引号
"singleQuote": true, // 无尾随逗号
"trailingComma": "none", // 箭头函数单个参数不加分号
"arrowParens": "avoid"
},
"prettyhtml": {
"printWidth": 140
}
}, // 同上prettier格式化代码
"prettier.semi": false,
"prettier.printWidth": 140,
"prettier.trailingComma": "none",
"prettier.singleQuote": true,
"prettier.arrowParens": "avoid",
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript"
}, // 打字特效
"powermode.enabled": true, // 开启特效
"powermode.shake.intensity": 0, //解决防抖 // 去除右上角图标
"powermode.combo.counterEnabled": "hide",
"powermode.combo.timerEnabled": "hide",
"powermode.presets": "flames", // 火焰
"powermode.combo.location": "off",
"explorer.confirmDelete": false,
"git.enableSmartCommit": true,
"settingsSync.ignoredExtensions": [],
"git.confirmSync": false,
"explorer.confirmDragAndDrop": false,
"security.workspace.trust.untrustedFiles": "open"
// "powermode.presets": "fireworks" // 烟花
// "powermode.presets": "magic" // 魔法
// "powermode.presets": "clippy" // 回形针
// "powermode.presets": "simple-rift" // 粒子
// "powermode.presets": "exploding-rift" // 粒子
}