常用的vscode配置
{
"extensions.autoUpdate": "onlySelectedExtensions",
"workbench.iconTheme": "material-icon-theme",
"vsicons.dontShowNewVersionMessage": true,
"editor.fontSize": 16,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"workbench.editor.enablePreview": false,
"search.followSymlinks": false, //关闭rg.exe进程
"editor.lineNumbers": "on", //开启行数提示
"editor.quickSuggestions": {
//开启自动显示建议
"other": true,
"comments": true,
"strings": true
}, //每次保存自动格式化
"prettier.eslintIntegration": true, //让prettier使用eslint的代码格式进行校验
"prettier.semi": true, //使用带引号替代双引号
"javascript.format.insertSpaceBeforeFunctionParenthesis": true, //让函数(名)和后面的括号之间加个空格
"vetur.format.defaultFormatter.html": "js-beautify-html", //格式化.vue中html
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned" //属性强制折行对齐
},
"prettier": {
"printWidth": 80,
"singleQuote": true,
"semi": false,
"trailingComma": "es5",
"tabWidth": 2,
"useTabs": false
}
},
"eslint.format.enable": true, // eslint格式化开启
"eslint.validate": [
// eslint校验的文件列表
"javascript",
"vue",
"html",
"javascriptreact",
"vue-html"
],
/* 添加如下配置 */
"vetur.format.defaultFormatter.js": "vscode-typescript", // 取消vetur默认的JavaScript格式化工具
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features" // 只采用eslint的格式化
},
"[vue]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" // vue文件还是采用vetur格式化
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
//"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"terminal.integrated.defaultProfile.windows": "C:\\Windows\\System32\\cmd.exe",
"javascript.updateImportsOnFileMove.enabled": "always",
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"extensions.ignoreRecommendations": true,
"scm.diffDecorationsGutterAction": "none",
"scm.diffDecorations": "none",
"intelephense.diagnostics.languageConstraints": false,
"workbench.colorTheme": "Monokai",
"editor.minimap.enabled": false,
"breadcrumbs.enabled": false,
"editor.unicodeHighlight.allowedCharacters": {
" ": true
},
"editor.unicodeHighlight.ambiguousCharacters": false,
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"settingsSync.ignoredExtensions": [
"daxiang.tp5-snippet"
],
"px-to-rpx.baseWidth": 450,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"px-to-rpx.fixedDigits": 2,
"php.validate.executablePath": "C:/Users/xfstu/AppData/Local/BtSoft/php/82/php.exe",
"vetur.completion.scaffoldSnippetSources": {
"workspace": "💼",
"user": "🗒️",
"vetur": "✌"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"prettier.printWidth": 160,
"prettier.singleQuote": true,
"prettier.vueIndentScriptAndStyle": true,
"[python]": {
"editor.formatOnType": true
},
"git.ignoreMissingGitWarning": true,
"window.commandCenter": false,
"codeium.enableConfig": {
"*": true
},
"[typescript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"editor.tabSize": 2,
"redhat.telemetry.enabled": false,
"codeium.enableCodeLens": false,
"editor.stickyScroll.enabled": false,
"intelephense.environment.includePaths": [
"vendor",
"extend"
],
"intelephense.files.associations": [
"*.php",
"*.phtml"
],
"intelephense.files.exclude": [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
"**/CVS/**",
"**/.DS_Store/**",
"**/node_modules/**",
"**/bower_components/**",
"**/.history/**",
"**/vendor/**/vendor/**",
"**/vendor/**/{Tests,tests}/**"
],
"codeium.aggressiveShutdown": true,
"npm.exclude": ""
}
常用的扩展
- Codeium
- Material Icon Theme
- PHP Intelephense
- Vue - Official
- ESLint
- Prettier ESLint
- vue-helper
本文来自博客园,作者:小枫同学,除网络转载的部分,其他版权属于作者和博客园所有,未经作者或博客园许可,禁止转载、复制、重新发布完整或者部分文字、代码、图片等信息,否则将保留追究法律责任的权利(如博客侵权了您的作品,本人再次表示抱歉,请将原创地址发送至下文邮箱,核实后立刻删除。)。查阅文章的同学,由于网络爬虫严重,有些代码并不会完整贴出来或者存在bug,不过你可以发送邮件到xfstune@126.com获取新代码,记得附上文章链接