Vscode开发
插件
设置配置
{
// 配置airplay
"editor.inlineSuggest.enabled": true,
"git.ignoreWindowsGit27Warning": true,
"editor.fontSize": 17,
"extensions.webWorker": true,
"terminal.integrated.tabs.enabled": true,
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
},
"Windows PowerShell": {
"path": "C:\\Windows\\System32\\cmd.exe"
}
},
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "One Dark Pro",
"cssrem.addMark": true,
"liveServer.settings.donotShowInfoMsg": true,
"less.compile": {},
// 样式
"workbench.colorCustomizations": {
"terminal.foreground": "#D8D8D8",
"terminalCursor.background": "#edf065",
"terminalCursor.foreground": "#D8D8D8",
"terminal.ansiBlack": "#181818",
"terminal.ansiBlue": "#7CAFC2",
"terminal.ansiBrightBlack": "#585858",
"terminal.ansiBrightBlue": "#7CAFC2",
"terminal.ansiBrightCyan": "#86C1B9",
"terminal.ansiBrightGreen": "#A1B56C",
"terminal.ansiBrightMagenta": "#BA8BAF",
"terminal.ansiBrightRed": "#AB4642",
"terminal.ansiBrightWhite": "#F8F8F8",
"terminal.ansiBrightYellow": "#F7CA88",
"terminal.ansiCyan": "#86C1B9",
"terminal.ansiGreen": "#A1B56C",
"terminal.ansiMagenta": "#BA8BAF",
"terminal.ansiRed": "#AB4642",
"terminal.ansiWhite": "#D8D8D8",
"terminal.ansiYellow": "#F7CA88"
},
//配置新建文件注释和方法注释
"fileheader.configObj": {
"createFileTime": true, //设置为true则为文件新建时候作为date,否则注释生成时间为date
"autoAdd": true, //自动生成注释,老是忘记的同学可以设置
"annotationStr": {
"head": "/* *",
"middle": "* @",
"end": " */",
"use": true //设置自定义注释可用
},
"headInsertLine": {
"php": 2
}
},
"fileheader.cursorMode": {
"description": "",
"param ": "",
"return": ""
},
"fileheader.customMade": {
"description": "", //文件内容描述
"author": "wanghao", //编辑人
"Date": "Do not edit", //时间
"Modified By": "", //修改人
"version": "1.0.0" //版本
},
// tab 大小为2个空格
"editor.tabSize": 2,
// 100 列后换行
"editor.wordWrapColumn": 100,
// 开启 vscode 文件路径导航
"breadcrumbs.enabled": true,
// 设置 tab 键盘就行补全
"emmet.triggerExpansionOnTab": true,
// "emmet.showAbbreviationSuggestions": true,
"emmet.showExpandedAbbreviation": "always",
"emmet.includeLanguages": {
"javascript": "html",
"wxml": "html"
},
"workbench.editorAssociations": {
"*.ipynb": "jupyter.notebook.ipynb"
},
"cssrem.fixedDigits": 3,
"editor.tokenColorCustomizations": {
"comments": "#0becece8" // 注释
},
// # 每次保存的时候将代码按eslint格式进行修复
// "eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
// vue代码风格配置
"vetur.validation.template": true,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.scss": "prettier",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"vetur.format.defaultFormatterOptions": {
"prettier": {
// "semi": false, //不加分号
"singleQuote": true, //用单引号
"trailingComma": "none",
"bracketSpacing": true,
"tabWidth": 2,
"arrowParens": "avoid"
},
"js-beautify-html": {
// "wrap_line_length": 250, //换行长度
"wrap_attributes": "auto" //属性换行 force-aligned
// "end_with_newline": false
}
},
// 根据老师增加的
"files.associations": {
"*.vue": "vue",
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript"
},
"eslint.codeAction.showDocumentation": {
"enable": false
},
"eslint.workingDirectories": [
".eslintrc.js",
{
"mode": "auto"
}
],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"workbench.editor.showTabs": true,
"[javascript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" //格式js
},
"[vue]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" //格式vue
},
"editor.defaultFormatter": "esbenp.prettier-vscode", //格式ts
"winopacity.opacity": 235,
"eslint.alwaysShowStatus": true,
"security.workspace.trust.untrustedFiles": "open",
"workbench.editor.enablePreview": false,
"editor.minimap.enabled": false,
"minapp-vscode.disableAutoConfig": true,
"files.autoSave": "afterDelay",
"editor.formatOnPaste": true,
"editor.quickSuggestions": {
"strings": true
},
"editor.formatOnSave": true,
"git.suggestSmartCommit": false,
"diffEditor.ignoreTrimWhitespace": false,
// 配置文件--同步vscode配置
"peacock.surpriseMeOnStartup": true,
"sync.gist": "ecda0f6bf591395965064b95c8964968",
"sync.autoUpload": true,
"git.autofetch": true
}