配置
{
"workbench.iconTheme": "vscode-icons",
"tabnine.experimentalAutoImports": true,
"workbench.startupEditor": "none",
"git.path": "E:\\install\\git\\Git\\cmd\\git.exe",
"files.autoSave": "afterDelay",
"terminal.integrated.profiles.windows": {
"gitBash": {
"path": "E:\\install\\git\\Git\\bin\\bash.exe",//這里是的的bash路徑
}
},
"terminal.integrated.defaultProfile.windows": "gitBash",
"editor.suggest.snippetsPreventQuickSuggestions": false,
"sync.gist": "f4b5381c6743d1873f705440f5805ead",
"screencastMode.fontSize": 55,
"screencastMode.keyboardOverlayTimeout": 600,
// vscode默認(rèn)啟用了根據(jù)文件類型自動(dòng)設(shè)置tabsize的選項(xiàng)
"editor.detectIndentation": false,
// 重新設(shè)定tabsize
// "editor.tabSize": 2,
// "editor.fontSize": 16,
// #每次保存的時(shí)候自動(dòng)格式化
"editor.formatOnSave": true,
// #每次保存的時(shí)候?qū)⒋a按eslint格式進(jìn)行修復(fù) ,"eslint.autoFixOnSave": true 這個(gè)已經(jīng)過(guò)時(shí)了
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.snippetSuggestions": "top", // 代碼提示踱讨。許多插件都有代碼提示,代碼縮寫(xiě)提示優(yōu)先顯示在最上方
// 粘貼后的內(nèi)容, 是否自動(dòng)格式化
"editor.formatOnPaste": false,
"eslint.format.enable": true,
// "files.autoSave": "afterDelay", //超過(guò)屏幕視圖換行
// "eslint.validate": [
// // eslint規(guī)則對(duì)以下幾種后綴文件生效. 默認(rèn)為["javascript", "javascriptreact"]
// "javascript",
// "javascriptreact",
// "html",
// "typescript",
// "typescriptreact"
// ],
// 使能每一種語(yǔ)言默認(rèn)格式化規(guī)則
"[json]": {
// 對(duì)json文件,使用 JSON語(yǔ)言功能 進(jìn)行格式化
"editor.defaultFormatter": "vscode.json-language-features"
},
"[html]": {
// 對(duì)html文件吊说,使用 vscode.html-language-features(vscode內(nèi)置規(guī)則) 進(jìn)行格式化,不要使用 prettier
"editor.defaultFormatter": "vscode.html-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
// 可選值: eslint :"dbaeumer.vscode-eslint" vetur: "octref.vetur" prettier: "esbenp.prettier-vscode"
// 對(duì) vue 文件戳气,使用 prettier(格式化規(guī)則) + eslint(校驗(yàn)) 進(jìn)行格式化驳概,也可以選擇 vetur 插件若河,或者單獨(dú)選擇prettier不加eslint
"editor.defaultFormatter": "octref.vetur"
},
// "[typescript]": {
// // 對(duì)ts文件進(jìn)行格式化時(shí)平道,使用哪一種風(fēng)格 (此處使用的是vscode中安裝的ts插件默認(rèn)風(fēng)格進(jìn)行格式化)
// "editor.defaultFormatter": "vscode.typescript-language-features"
// },
"search.exclude": {
// VScode進(jìn)行文件搜索時(shí)闯估,不搜索這些區(qū)域灼舍。
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"**/.DS_Store": true,
"**/.git": true,
"**/.gitignore": true,
"**/.idea": true,
"**/.svn": true,
"**/.vscode": true,
"**/build": true,
"**/dist": true,
"**/tmp": true,
"**/yarn.lock": true,
"**/assets": true
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
},
// 配置文件關(guān)聯(lián)
"files.associations": {
// 比如小程序中的 .wxss 這種文件,會(huì)把它作為css文件來(lái)處理涨薪,提供對(duì)應(yīng)的css的語(yǔ)法提示骑素,css的格式化等。
"*.wxss": "css",
"*.cjson": "jsonc",
"*.wxs": "javascript",
"*.ts": "typescript",
"*.vue": "vue",
"*.dart": "dart"
},
/* prettier的配置 */
"prettier.printWidth": 100, // 超過(guò)最大值換行
"prettier.tabWidth": 2, // 縮進(jìn)字節(jié)數(shù)
"prettier.useTabs": false, // 縮進(jìn)不使用tab刚夺,使用空格
"prettier.semi": true, // 句尾添加分號(hào)
"prettier.singleQuote": false, // 使用單引號(hào)代替雙引號(hào)
"prettier.proseWrap": "preserve", // 默認(rèn)值献丑。因?yàn)槭褂昧艘恍┱坌忻舾行偷匿秩酒鳎ㄈ鏕itHub comment)而按照markdown文本樣式進(jìn)行折行
"prettier.arrowParens": "avoid", // (x) => {} 箭頭函數(shù)參數(shù)只有一個(gè)時(shí)是否要有小括號(hào)。avoid:省略括號(hào)
"prettier.bracketSpacing": true, // 在對(duì)象侠姑,數(shù)組括號(hào)與文字之間加空格 "{ foo: bar }"
"prettier.endOfLine": "auto", // 結(jié)尾是 \n \r \n\r auto
"prettier.htmlWhitespaceSensitivity": "ignore",
"prettier.ignorePath": ".prettierignore", // 不使用prettier格式化的文件填寫(xiě)在項(xiàng)目的.prettierignore文件中
// "prettier.jsxBracketSameLine": false, // 在jsx中把'>' 是否單獨(dú)放一行
"prettier.jsxSingleQuote": false, // 在jsx中使用單引號(hào)代替雙引號(hào)
"prettier.parser": "babylon", // 格式化的解析器创橄,默認(rèn)是babylon
"prettier.requireConfig": false, // Require a 'prettierconfig' to format prettier
"prettier.stylelintIntegration": false, //不讓prettier使用stylelint的代碼格式進(jìn)行校驗(yàn)
"prettier.trailingComma": "es5", // 在對(duì)象或數(shù)組最后一個(gè)元素后面是否加逗號(hào)(在ES5中加尾逗號(hào))
"prettier.tslintIntegration": false, // 不讓prettier使用tslint的代碼格式進(jìn)行校驗(yàn)
// #讓prettier使用eslint的代碼格式進(jìn)行校驗(yàn)
"prettier.eslintIntegration": true,
// #讓函數(shù)(名)和后面的括號(hào)之間加個(gè)空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
// #這個(gè)按用戶自身習(xí)慣選擇
"vetur.format.defaultFormatter.html": "js-beautify-html",
// #讓vue中的js按編輯器自帶的ts格式進(jìn)行格式化
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "auto"
// #vue組件中html代碼格式化樣式 標(biāo)簽換行force-aligned 不換行auto
}
},
"emmet.includeLanguages": {
"wxml": "html"
},
"minapp-vscode.disableAutoConfig": true,
"explorer.confirmDelete": false,
"vetur.format.options.tabSize": 2,
// "git.autofetch": true, // 在push代碼時(shí),是否先自動(dòng)從遠(yuǎn)端拉取代碼
// "gitlens.advanced.messages": {
// // 配置gitlen中g(shù)it提交歷史記錄的信息顯示情況
// "suppressCommitHasNoPreviousCommitWarning": false,
// "suppressCommitNotFoundWarning": false,
// "suppressFileNotUnderSourceControlWarning": false,
// "suppressGitVersionWarning": false,
// "suppressLineUncommittedWarning": false,
// "suppressNoRepositoryWarning": false,
// "suppressResultsExplorerNotice": false,
// "suppressShowKeyBindingsNotice": true,
// "suppressUpdateNotice": true,
// "suppressWelcomeNotice": false
// },
// 格式化stylus, 需安裝Manta's Stylus Supremacy插件
"stylusSupremacy.insertColons": true, // 是否插入冒號(hào)
"stylusSupremacy.insertSemicolons": true, // 是否插入分好
"stylusSupremacy.insertBraces": true, // 是否插入大括號(hào)
"stylusSupremacy.insertNewLineAroundImports": false, // import之后是否換行
"stylusSupremacy.insertNewLineAroundBlocks": false,
"editor.suggestSelection": "first",
// "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", // 兩個(gè)選擇器中是否換行
// "easysass.compileAfterSave": true,
// "easysass.excludeRegex": "",
// "easysass.formats": [
// {
// "format": "expanded",
// "extension": ".css"
// },
// {
// "format": "compressed",
// "extension": ".min.css"
// }
// ],
// "easysass.targetDir": "./",
"debug.openDebug": "openOnDebugBreak", // 斷點(diǎn)調(diào)試時(shí)莽红,遇到斷點(diǎn)妥畏,自動(dòng)顯示調(diào)試視圖。(全局船老,不可為每種語(yǔ)言單獨(dú)配置)
// "terminal.integrated.rendererType": "dom",
//"workbench.colorTheme": "Solarized Light",
// "git.suggestSmartCommit": false,
"settingsSync.ignoredExtensions": [],
"launch": {
"configurations": [],
"compounds": []
},
//html標(biāo)簽屬性不換行 end
"editor.wordWrap": "on",
"auto-close-tag.activationOnLanguage": [
"xml",
"php",
"blade",
"ejs",
"jinja",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"plaintext",
"markdown",
"vue",
"liquid",
"erb",
"lang-cfml",
"cfml",
"HTML (EEx)",
"HTML (Eex)",
"plist"
],
"workbench.activityBar.visible": true,
"workbench.colorCustomizations": {},
// "editor.fontLigatures": null,
}
配套安裝的插件
image.png