{
// 換行
"editor.wordWrap": "off",
// 代码缩进修改成2个空格
"editor.tabSize": 2,
// 控制编辑器是否启用了代码折叠。
"editor.folding": true,
// 不檢查縮進,保存后統一按設置項來設置
"editor.detectIndentation": false,
// html格式化
"vetur.format.defaultFormatter.html": "js-beautify-html",
// vue组件中html代码格式化样式
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned"
}
},
// 文件保存时是否根据eslint进行格式化
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.format.enable": true,
"javascript.validate.enable": false,
//autoFix默认开启自动修复功能,只需输入字符串数组即可【用eslint的规则检测js文件、检测vue文件】
"eslint.validate": [
"javascript",
"javascriptreact" ,
"vue",
"html",
"jsx",
],
"eslint.alwaysShowStatus": true,
// eslint配置文件
"eslint.options": {
"extensions": [
".js",
".vue"
]
},
// 設置行高
"editor.lineHeight": 20,
// 让prettier使用eslint的代码格式进行校验
"prettier.eslintIntegration": true,
// 去掉代码结尾的分号
"prettier.semi": true,
// 使用带引号替代双引号
"prettier.singleQuote": true,
// js設置單引號
"javascript.preferences.quoteStyle": "single",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.css": "prettier",
"vetur.format.defaultFormatter.less": "prettier",
// 配置文件关联,以便启用对应的提示
"files.associations": {
"*.vue": "vue",
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"*.art": "html"
},
"less.compile": {
// "compress": true, // 是否删除多余空白字符
// "sourceMap": true, // 是否创建文件目录树,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"
},
// 高亮所忽略的组件数组
"wxmlConfig.tagNoActiveArr": [
"view",
"button",
"text",
"icon",
"image",
"navigator",
"block",
"input",
"template",
"form",
"camera",
"textarea"
],
// 设置终端为cmder
"terminal.integrated.shell.windows": "cmd.exe",
"terminal.integrated.env.windows": {
//设置cmder的根目录
"CMDER_ROOT": "D:\\Users\\cmder"
},
"terminal.integrated.shellArgs.windows": [
"/k",
//设置启动初始化目录
"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