{
// 換行
"editor.wordWrap": "off",
// 代碼縮進修改成2個空格
"editor.tabSize": 2,
// 控制編輯器是否啟用了代碼折疊胞得。
"editor.folding": true,
// 不檢查縮進,保存后統(tǒng)一按設(shè)置項來設(shè)置
"editor.detectIndentation": false,
// html格式化
"vetur.format.defaultFormatter.html": "js-beautify-html",
// vue組件中html代碼格式化樣式
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned"
}
},
// 文件保存時是否根據(jù)eslint進行格式化
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.format.enable": true,
"javascript.validate.enable": false,
//autoFix默認開啟自動修復功能,只需輸入字符串數(shù)組即可【用eslint的規(guī)則檢測js文件、檢測vue文件】
"eslint.validate": [
"javascript",
"javascriptreact" ,
"vue",
"html",
"jsx",
],
"eslint.alwaysShowStatus": true,
// eslint配置文件
"eslint.options": {
"extensions": [
".js",
".vue"
]
},
// 設(shè)置行高
"editor.lineHeight": 20,
// 讓prettier使用eslint的代碼格式進行校驗
"prettier.eslintIntegration": true,
// 去掉代碼結(jié)尾的分號
"prettier.semi": true,
// 使用帶引號替代雙引號
"prettier.singleQuote": true,
// js設(shè)置單引號
"javascript.preferences.quoteStyle": "single",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.css": "prettier",
"vetur.format.defaultFormatter.less": "prettier",
// 配置文件關(guān)聯(lián),以便啟用對應的提示
"files.associations": {
"*.vue": "vue",
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"*.art": "html"
},
"less.compile": {
// "compress": true, // 是否刪除多余空白字符
// "sourceMap": true, // 是否創(chuàng)建文件目錄樹,true的話會自動生成一個 .css.map 文件
"outExt": ".wxss" // 輸出文件的后綴,默認為.css
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true
},
"emmet.syntaxProfiles": {
"javascript": "jsx",
"vue": "html",
"vue-html": "html"
},
"git.confirmSync": false,
"editor.renderWhitespace": "boundary",
"editor.cursorBlinking": "smooth",
"editor.minimap.enabled": true,
"editor.minimap.renderCharacters": false,
"window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
"editor.codeLens": true,
"editor.snippetSuggestions": "top",
"emmet.includeLanguages": {
"wxml": "html"
},
"minapp-vscode.disableAutoConfig": true,
"files.autoSave": "off",
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"explorer.confirmDragAndDrop": false,
"diffEditor.ignoreTrimWhitespace": true,
"[css]": {
"editor.defaultFormatter": "aeschli.vscode-css-formatter"
},
"emmet.triggerExpansionOnTab": true,
"emmet.showSuggestionsAsSnippets": true,
"vsicons.dontShowNewVersionMessage": true,
"emmet.extensionsPath": [
""
],
"workbench.iconTheme": "vscode-icons",
"auto-close-tag.activationOnLanguage": [
"*.art",
"xml",
"php",
"blade",
"ejs",
"jinja",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"plaintext",
"markdown",
"vue",
"liquid",
"erb",
"lang-cfml",
"cfml",
"HTML (EEx)",
"HTML (Eex)",
"plist"
],
// 高亮的顏色,emm暫時只支持這樣寫
"wxmlConfig.activeColor": {
"color": "#e5c07b"
},
// 是否禁用高亮組件
"wxmlConfig.activeDisable": false,
// 是否開啟保存自動格式化
"wxmlConfig.onSaveFormat": false,
"wxmlConfig.format": {
"brace_style": "collapse",
"end_with_newline": false,
"indent_char": "",
"indent_handlebars": false,
"indent_inner_html": false,
"indent_scripts": "keep",
"indent_size": 2,
"indent_with_tabs": true,
"max_preserve_newlines": 1,
"preserve_newlines": true,
"wrap_attributes": "force-expand-multiline"
},
// 高亮所忽略的組件數(shù)組
"wxmlConfig.tagNoActiveArr": [
"view",
"button",
"text",
"icon",
"image",
"navigator",
"block",
"input",
"template",
"form",
"camera",
"textarea"
],
// 設(shè)置終端為cmder
"terminal.integrated.shell.windows": "cmd.exe",
"terminal.integrated.env.windows": {
//設(shè)置cmder的根目錄
"CMDER_ROOT": "D:\\Users\\cmder"
},
"terminal.integrated.shellArgs.windows": [
"/k",
//設(shè)置啟動初始化目錄
"cmder的根目錄\\vendor\\init.bat"
],
"turboConsoleLog.quote": "'",
"editor.formatOnSave": true,
"editor.renderIndentGuides": false
}
微信小程序自定義組件代碼片段提示
Auto Close Tag
Auto Rename Tag
AutoFileName
Beautify
Beautify css/sass/scss/less
Bracket Pair Colorizer
Browser Preview
Chinese (Simplified) Language Pack for Visual Studio Code
Cobalt2 Theme Official
Colonize
CSS Formatter
CSS Peek
CSS Tree
Debugger for Chrome
DotENV
Easy LESS
Element UI Snippets
ES7 React/Redux/GraphQL/React-Native snippets
ESLint
Guides
Highlight Matching Tag
HTML Snippets
i18n Ally
Iconify IntelliSense
JetJet-theme
Material Icon Theme
minapp
Path Autocomplete
Picture Element
Prettier - Code formatter
stylelint
Turbo Console Log
Vetur
VS Code Counter
VSCode Great Icons
vscode wxml
vscode-icons
vue
Vue 3 Snippets
Vue VSCode Snippets
WakaTime
WindiCSS IntelliSense
wxml
wechat-snippet