├── .eslintignore ├── .eslintrc.js ├── .github ├── ISSUE_TEMPLATE │ ├── bug.md │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── ci.yml │ └── deploy.yml ├── .gitignore ├── .gitmessage ├── .prettierrc ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── res ├── icon.png └── prettyhtml.js ├── src ├── commands │ ├── constants.ts │ └── createMiniprogramComponent.ts ├── common │ ├── res │ │ └── components.json │ └── src │ │ ├── autocomplete.ts │ │ ├── custom.ts │ │ ├── definition.ts │ │ ├── dev │ │ ├── Component.ts │ │ ├── components.ts │ │ ├── config.ts │ │ └── index.ts │ │ ├── hover.ts │ │ ├── index.ts │ │ ├── lib │ │ ├── CacheableFile.ts │ │ ├── ConditionalCacheableFile.ts │ │ ├── fs.ts │ │ └── index.ts │ │ ├── mora │ │ └── async.ts │ │ └── parseAttrs.ts ├── extension.ts ├── plugin │ ├── ActiveTextEditorListener.ts │ ├── AutoCompletion.ts │ ├── HoverProvider.ts │ ├── LinkProvider.ts │ ├── PropDefinitionProvider.ts │ ├── PugAutoCompletion.ts │ ├── VueAutoCompletion.ts │ ├── WxmlAutoCompletion.ts │ ├── WxmlDocumentHighlight.ts │ ├── WxmlFormatter.ts │ ├── getTagAtPosition │ │ ├── base.ts │ │ ├── getPugTag.ts │ │ ├── getVueTag.ts │ │ ├── getWxmlTag.ts │ │ └── index.ts │ ├── lib │ │ ├── ScriptFile.ts │ │ ├── StyleFile.ts │ │ ├── closeTag.ts │ │ ├── config.ts │ │ ├── helper.ts │ │ ├── language.ts │ │ ├── loadScss.ts │ │ ├── quickParseStle.ts │ │ └── requirePackage.ts │ └── res │ │ └── snippets.ts ├── test │ ├── extension.test.ts │ └── index.ts ├── utils │ └── noderequire.ts └── wxml-parser │ ├── config.ts │ ├── index.ts │ ├── logParserError.ts │ ├── parser.ts │ └── structs.ts ├── syntaxes ├── wxml-pug.language-configuration.json ├── wxml-pug.tmLanguage.json ├── wxml.language-configuration.json └── wxml.tmLanguage.json ├── tsconfig.json └── webpack.config.js /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | coverage/ 3 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | parser: '@typescript-eslint/parser', 7 | plugins: ['@typescript-eslint'], 8 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], 9 | rules: { 10 | 'no-empty': 0, 11 | 'no-prototype-builtins': 0, 12 | 13 | '@typescript-eslint/ban-ts-comment': 0, 14 | '@typescript-eslint/no-namespace': 0, 15 | '@typescript-eslint/no-empty-function': 0, 16 | '@typescript-eslint/no-explicit-any': 0, 17 | '@typescript-eslint/no-unused-vars': 0, 18 | '@typescript-eslint/no-var-requires': 0 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F41E Bug report" 3 | about: Something isn’t working as expected 4 | title: "[Bug]: " 5 | labels: 'bug' 6 | assignees: 'iChenLei' 7 | --- 8 | 9 | **如何复现:** 10 | 11 | 12 | 步骤1: 13 | 14 | 15 | 步骤2: 16 | 17 | 18 | 步骤3: 19 | 20 | 21 | ... 22 | 23 | **期望的表现:** 24 | 25 | 26 | **实际的表现:** 27 | 28 | 29 | 30 | **插件运行环境** 31 | 32 | - `插件版本`: 33 | - `VSCode版本`: 34 | - `操作系统(非必须)`: 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "Feature Request" 3 | about: New Feature Request Issue 4 | title: "[Feature]: " 5 | labels: 'feature%20request' 6 | assignees: 'iChenLei' 7 | --- 8 | 9 | **功能描述:** 10 | 11 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **解决了什么问题**: 4 | 5 | 6 | **代码如何实现**: 7 | 8 | 9 | **检查清单**: 10 | 11 | 12 | 17 | - [ ] 本地测试通过 18 | - [ ] 可以正常build出vsix文件 19 | - [ ] 更新文档Readme和ChangeLog 20 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | # Github actions workflow name 2 | name: CI 3 | 4 | # Triggers the workflow on push or pull request events 5 | on: 6 | push: 7 | branches: [main, master] 8 | pull_request: 9 | branches: [main, master] 10 | 11 | jobs: 12 | VSCode-Test: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | with: 17 | fetch-depth: 2 18 | - uses: actions/setup-node@v3 19 | with: 20 | node-version: '18' 21 | cache: 'npm' 22 | - run: npm install 23 | # only test compile now, add unit test and e2e test in the future 24 | - run: npm run test-compile 25 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy 2 | 3 | on: 4 | push: 5 | tags: 6 | - "v*.*.*" 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | with: 14 | fetch-depth: 2 15 | - uses: actions/setup-node@v3 16 | with: 17 | node-version: '18' 18 | cache: 'npm' 19 | - run: npm install 20 | - name: Publish to Visual Studio Marketplace 21 | uses: HaaLeo/publish-vscode-extension@v1 22 | with: 23 | pat: ${{ secrets.VSCODE_TOKEN }} 24 | registryUrl: https://marketplace.visualstudio.com 25 | yarn: false 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | dist 3 | .cache 4 | .dtpl/dtpl.js 5 | vendor 6 | node_modules 7 | coverage 8 | .DS_Store 9 | 10 | .vscode-test/ 11 | *.vsix 12 | -------------------------------------------------------------------------------- /.gitmessage: -------------------------------------------------------------------------------- 1 | 2 | 3 | # (): 4 | # 5 | # Git Commit Message Guides: http://chris.beams.io/posts/git-commit/ 6 | # 7 | # Type keywrods: feat, fix, docs, style, refactor, perf, test, chore, revert 8 | # Changelog keywrods: Added, Changed, Breaks, Deprecated, Removed, Fixed, Security 9 | # 10 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": false, 6 | "singleQuote": true, 7 | "trailingComma": "es5", 8 | "bracketSpacing": true, 9 | "jsxBracketSameLine": false, 10 | "endOfLine": "lf", 11 | "arrowParens": "avoid", 12 | "jsxSingleQuote": true 13 | } 14 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "TS Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--disable-extensions", 15 | "--extensionDevelopmentPath=${workspaceFolder}" 16 | ], 17 | "outFiles": [ 18 | "${workspaceFolder}/dist/**/*.js" 19 | ], 20 | "preLaunchTask": "npm: watch" 21 | }, 22 | { 23 | "name": "Webpack Extension", 24 | "type": "extensionHost", 25 | "request": "launch", 26 | "runtimeExecutable": "${execPath}", 27 | "args": [ 28 | "--disable-extensions", 29 | "--extensionDevelopmentPath=${workspaceFolder}" 30 | ], 31 | "outFiles": [ 32 | "${workspaceFolder}/dist/**/*.js" 33 | ], 34 | "preLaunchTask": "npm: webpack" 35 | }, 36 | { 37 | "name": "Extension Tests", 38 | "type": "extensionHost", 39 | "request": "launch", 40 | "runtimeExecutable": "${execPath}", 41 | "args": [ 42 | "--disable-extensions", 43 | "--extensionDevelopmentPath=${workspaceFolder}", 44 | "--extensionTestsPath=${workspaceFolder}/out/test" 45 | ], 46 | "outFiles": [ 47 | "${workspaceFolder}/out/test/**/*.js" 48 | ], 49 | "preLaunchTask": "npm: watch" 50 | } 51 | ] 52 | } 53 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false // set this to true to hide the "out" folder with the compiled JS files 5 | }, 6 | "search.exclude": { 7 | "out": true // set this to false to include "out" folder in search results 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | }, 19 | { 20 | "type": "npm", 21 | "script": "webpack", 22 | "problemMatcher": "$tsc-watch", 23 | "isBackground": true, 24 | "presentation": { 25 | "reveal": "never" 26 | }, 27 | "group": { 28 | "kind": "build", 29 | "isDefault": true 30 | } 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .github/** 2 | .vscode/** 3 | .vscode-test/** 4 | dist/test/** 5 | dist/**/*.map 6 | dist/**/*.d.ts 7 | src/** 8 | .gitignore 9 | .eslintignore 10 | .prettierrc 11 | tsconfig.json 12 | vsc-extension-quickstart.md 13 | vendor/** 14 | 15 | node_modules/ 16 | !node_modules/prettier 17 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2.4.14 / 2024-11-23 2 | ================== 3 | * fix: prettier.format异步接口兼容支持 [#185](https://github.com/wx-minapp/minapp-vscode/pull/185) 4 | 5 | 2.4.13 / 2023-11-29 6 | ================== 7 | * 功能: 支持高亮带下划线的wxml标签名 [#177](https://github.com/wx-minapp/minapp-vscode/pull/177) 8 | 9 | 2.4.10 / 2023-04-26 10 | ================== 11 | * 功能: wxml 格式化添加 js-beautify 支持 12 | 13 | 2.4.9 / 2023-04-05 14 | ================== 15 | 16 | * 解决项目安全依赖问题 [#155](https://github.com/wx-minapp/minapp-vscode/pull/155),[#152](https://github.com/wx-minapp/minapp-vscode/pull/152),[#149](https://github.com/wx-minapp/minapp-vscode/pull/149) 17 | * 更新github actions配置 18 | * 更新vsce为@vscode/vsce 19 | 20 | 2.4.8 / 2022-07-02 21 | ================== 22 | 23 | * 更新发布CI插件`HaaLeo/publish-vscode-extension`到`v1` 24 | 25 | 2.4.7 / 2022-07-02 26 | ================== 27 | 28 | * 增加赞助链接 29 | * 更新依赖,将主分支`master`重命名为`main` 30 | 31 | 2.4.6 / 2022-01-05 32 | ================== 33 | 34 | * Fix [#133](https://github.com/wx-minapp/minapp-vscode/issues/133), [v2.4.2](https://github.com/wx-minapp/minapp-vscode/compare/v2.4.1...v2.4.2) delete `WxmlDocumentHighlightProvider` unexpectedly 35 | 36 | 2.4.5 / 2021-12-08 37 | ================== 38 | 39 | * Fix [#129](https://github.com/wx-minapp/minapp-vscode/issues/129) 40 | 41 | 2.4.4 / 2021-12-04 42 | ================== 43 | 44 | * 更改`prettyHtml`源代码以提高与wxml的兼容性,修复一些与之相关的format错误 45 | 46 | 2.4.3 / 2021-11-16 47 | ================== 48 | 49 | * 增加`minapp-vscode:init`context标志位,非小程序项目不展示`New Miniprogram Component`功能 50 | 51 | 2.4.2 / 2021-11-16 52 | ================== 53 | 54 | * 新增`New Miniprogram Component`文件右键选项,快速创建一个小程序组件文件,支持配置 55 | * 新增`minapp-vscode.cssExtname`配置 56 | * 新增`minapp-vscode.jsExtname`配置 57 | * 新增`minapp-vscode.wxmlExtname`配置 58 | * 优化`跳转到定义`功能,支持style属性内插值的跳转 59 | * 优化插件启动条件,加入`"workspaceContains:**/project.config.json"`和`"workspaceContains:**/app.wxss"` 60 | 61 | 2.4.1 / 2021-11-07 62 | ================== 63 | 64 | * 插件名字从`WXML - Language Services`改为`WXML - Language Service` 65 | * 优化`跳转到定义`功能,兜底为文字搜索尽可能提供有效的定义跳转 66 | 67 | 2.4.0 / 2021-11-03 68 | ================== 69 | 70 | * 新增配置`minapp-vscode.disableFormat`,解决[#83 (comment)](https://github.com/wx-minapp/minapp-vscode/issues/83#issuecomment-958626391) 71 | * 更新同步微信小程序组件元数据至基础库版本v2.20.1 72 | 73 | 2.3.7 / 2021-10-13 74 | ================== 75 | 76 | * 更改配置webpack#resolve.resolvemainfields修复JSON5导入的问题 77 | * 支持ObjectProperty形式申明的函数跳转,Fix [#99](https://github.com/wx-minapp/minapp-vscode/issues/99) 78 | * wxml内函数跳转支持`mut-bind`,`capture-catch`and`capture-bind` 79 | 80 | 2.3.6 / 2021-10-13 81 | ================== 82 | 83 | * 支持wxml中tag跳转到自定义的组件 84 | 85 | 2.3.5 / 2021-10-11 86 | ================== 87 | 88 | * 更新同步微信小程序WXML标签元数据 89 | * 增加无障碍访问a11y相关标签属性自动补全提示 90 | 91 | 2.3.4 / 2021-09-01 92 | ================== 93 | 94 | * 添加钉钉用户交流群二维码 95 | * 删除不再使用的travis-ci配置文件 96 | 97 | 2.3.3 / 2021-08-31 98 | ================== 99 | 100 | * 参考vscode-eslint处理webpack打包时`require`语句失效的问题 101 | 102 | 2.3.2 / 2021-08-31 103 | ================== 104 | 105 | * 将prettier打包进vsix文件,修复#103 106 | 107 | 2.3.1 / 2021-08-30 108 | ================== 109 | 110 | * 插件更名 111 | * 增加deploy状态badge 112 | 113 | 2.3.0 / 2021-08-30 114 | ================== 115 | 116 | * 优化插件vsix文件体积(2.88mb -> 261kb) 117 | * 插件更名&更换icon 118 | * 更新代码提示中的微信官方文档链接/wepy文档链接 119 | * 增加Github Actions CI 120 | * 增加issue和PR模板 121 | * 优化wxml语法高亮tmLanguage配置 122 | 123 | 2.1.0 / 2019-08-01 124 | ================== 125 | 126 | * 组件独有的事件不出现在 `bind:` 中 127 | 128 | 2.1.0 / 2019-07-06 129 | ================== 130 | 131 | * 添加 `showSuggestionOnEnter` 配置,按 Enter 键默认不出现补全,需要将 `showSuggestionOnEnter` 设置成 true 132 | 133 | 2.0.0 / 2019-07-01 134 | ================== 135 | 136 | * 优化 wxml 的自动补全机制 [#40](https://github.com/wx-minapp/minapp-vscode/pull/40) 137 | * 优化函数自动补全 [#39](https://github.com/wx-minapp/minapp-vscode/pull/39) [#42](https://github.com/wx-minapp/minapp-vscode/pull/42) 138 | * `{{` 和 `}}` 在属性值中可以自动配对 [#20](https://github.com/wx-minapp/minapp-vscode/issues/20) 139 | * 优化语法高亮,参考 handlebars 的高亮语法 [#44](https://github.com/wx-minapp/minapp-vscode/pull/44) 140 | 141 | 1.16.0 / 2019-06-21 142 | ================== 143 | 144 | * 标签多行写法可补全 145 | * tagName 和 tagAttr 可以随时补全 146 | 147 | 1.15.0 / 2019-06-09 148 | ================== 149 | 150 | * 支持解析 sass/scss 文件,方便样式名自动补全 151 | 152 | 1.14.0 / 2019-06-03 153 | ================== 154 | 155 | * wxmlFormatter 配置支持热更新 156 | * prettyHtml 不会移除自闭合标签的 `/` 符号; [#11](https://github.com/wx-minapp/minapp-vscode/issues/11) 157 | 158 | 1.13.0 / 2019-04-23 159 | ================== 160 | 161 | wxml格式增强 [#23](https://github.com/wx-minapp/minapp-vscode/pull/23) 162 | 163 | * [x] 支持 `prettyHtml` 格式化 164 | * [x] 支持 `prettier` 格式 wxml 165 | * [x] 支持 选择自定义其他语言 `documentSelector` 166 | * [x] 自动读取项目中的配置文件 (仅针对`prettyHtml`,和`prettier`) 167 | 1. [Prettier configuration file](https://prettier.io/docs/en/configuration.html) 168 | 2. `.editorconfig` 169 | 170 | 新增配置 171 | 172 | * `minapp-vscode.wxmlFormatter` `string `三种(`wxml`,`prettyHtml`,`prettier`) 可选,默认`wxml` (注,目前切换后需要重启vscode) 173 | * `minapp-vscode.documentSelector` `string[]` 自定义关联文件类型, 174 | * `minapp-vscode.prettyHtml` `{}` [prettyhtml配置项](https://github.com/Prettyhtml/prettyhtml#prettyhtmldoc-string-options-vfile) 175 | * `minapp-vscode.prettier` `{}` [prettier配置项](https://prettier.io/docs/en/configuration.html) 176 | 177 | 178 | 1.12.1 / 2019-01-14 179 | ================== 180 | 181 | * 修复组件自带的事件不支持 bind:xxx 的写法的问题,见 [issues/15](https://github.com/wx-minapp/minapp-vscode/issues/15) 182 | 183 | 1.12.0 / 2019-01-05 184 | ================== 185 | 186 | * 支持 [mpx 小程序框架](https://github.com/didi/mpx) 187 | 188 | 189 | 1.11.1 / 2018-12-03 190 | ================== 191 | 192 | * bind/catch 不需要带 : 也可以高亮后面的函数 193 | 194 | 195 | 1.11.0 / 2018-11-21 196 | ================== 197 | 198 | * 可以点击模板文件中的函数或属性跳转到 js/ts 定义的地方 199 | 200 | 201 | 1.10.2 / 2018-11-19 202 | ================== 203 | 204 | * 修复样式文件解析缓存冲突问题 205 | 206 | 1.10.1 / 2018-11-19 207 | ================== 208 | 209 | * 优化样式自动补全 210 | - 显示相对根目录的文件路径 211 | - 不再补全已经存在的样式 212 | - wxml 中的 class 属性支持 “查找所有引用” 213 | 214 | * 升级 ts 到 3.1 215 | 216 | 1.10.0 / 2018-11-15 217 | ================== 218 | 219 | * 添加样式名自动补全功能 220 | 221 | 1.9.2 / 2018-11-13 222 | ================== 223 | 224 | * [vscode 1.29 在格式化时换行符全变成了 auto](https://github.com/wx-minapp/minapp-vscode/issues/6) 225 | 226 | 1.9.1 / 2018-11-06 227 | ================== 228 | 229 | * [修复自闭合的 wxs 标签会导致高亮问题的 BUG](https://github.com/wx-minapp/minapp-vscode/issues/4) 230 | 231 | 1.9.0 / 2018-10-07 232 | ================== 233 | 234 | * 同步官方组件的最新数据 235 | 236 | 1.8.0 / 2018-09-02 237 | ================== 238 | 239 | * 同步官方组件的最新数据 240 | 241 | 1.7.2 / 2018-08-06 242 | ================== 243 | 244 | * 添加配置项 `reserveTags`,一般 "text" 标签中的内容如果过长,格式化后会在行首和行尾添加换行符,如果不需要,可以将 reserveTags 设置成 `["text"]` 245 | 246 | 1.7.1 / 2018-07-29 247 | ================== 248 | 249 | * 添加配置项 `wxmlQuoteStyle` 和 `pugQuoteStyle`,可以配置自动生成的引号是 `"` 还是 `'`,并且 snippet 中的引号也会使用配置的引号 250 | 251 | 1.7.0 / 2018-07-07 252 | ================== 253 | 254 | * 优化自动补全体验,不再需要输入空格触发自动补全,自动会在合适的时机触发 255 | * 修复 wxs 标签在格式化时前后添加换行符的问题 [#84](https://github.com/qiu8310/minapp/issues/84) 256 | * 修复 wxml `{{'a' + foo + 'b'}}` 中的表达式不高亮的问题 257 | 258 | 1.6.1 / 2018-06-28 259 | ================== 260 | 261 | * 更新项目 @minapp/wxml-parser,旧版处理多余的结束标签会报错 262 | 263 | 1.6.0 / 2018-06-23 264 | ================== 265 | 266 | * wxml 中支持 [emmet 语法](https://docs.emmet.io/cheat-sheet/),[详情见下文](#emmet) 267 | * 自动关联文件类型 268 | - *.wxs => javascript 269 | - *.cjson => jsonc 270 | - *.wxss => css 271 | * wxml 文件在格式化时,标签属性值上的引号会保留原有的风格(即如果原来是双引号,格式化后也会是双引号;原来是单引号,格式化后也会是单引号) 272 | 273 | 274 | 1.5.1 / 2018-06-15 275 | ================== 276 | 277 | * 同步微信官方发布的 [2.1.0](https://developers.weixin.qq.com/miniprogram/dev/devtools/uplog.html#20180614-%E5%9F%BA%E7%A1%80%E5%BA%93%E6%9B%B4%E6%96%B0%EF%BC%88210%EF%BC%89) 的组件数据 278 | 279 | 280 | 1.5.0 / 2018-06-10 281 | ================== 282 | 283 | * 纯 wxml 文件中支持 [wxs 标签](https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxs/01wxs-module.html) 284 | 285 | 1.4.0 / 2018-06-05 286 | ================== 287 | 288 | * 在自动补全中支持生成 self close tag 289 | 290 | 可以在配置项 `minapp-vscode.selfCloseTags` 中配置这些 self close tag 291 | 292 | * 格式化选项 `minapp-vscode.formatMaxLineCharacters` 支持设置成 0 来表示无限大 293 | 294 | 如果为 0 时,在格式化时所有的直接含有文本的标签都会格式在一行中 295 | 296 | 297 | 1.3.1 / 2018-06-03 298 | ================== 299 | 300 | * wxml 语言中高亮匹配的标签 [#72](https://github.com/qiu8310/minapp/issues/72) 301 | 302 | 1.3.0 / 2018-05-26 303 | ================== 304 | 305 | * 添加 snippets 功能 [详情查看](./README.md#snippets) 306 | 307 | * 优化变量高亮(切换文件时,会有些延迟),见 [#68](https://github.com/qiu8310/minapp/issues/68) 308 | * 标签的属性值是布尔值时,会自动弹出 true/false 来让你选择 309 | * 修复自动补全中默认值无法在编辑时选中的问题 310 | 311 | 312 | 1.2.0 / 2018-05-07 313 | ================== 314 | 315 | * 模板文件中 js 变量高亮(纯 wxml 文件才支持,vue 文件不支持),[详情查看](./README.md#highlight) 316 | 317 | 1.1.1 / 2018-05-03 318 | ================== 319 | 320 | * 更新小程序组件数据,主要添加了 [ad 组件](https://developers.weixin.qq.com/miniprogram/dev/component/ad.html) 321 | 322 | 1.1.0 / 2018-04-28 323 | ================== 324 | 325 | * wxml / pug 文件中的 src 标签支持 link 功能(另外可以通过配置 `minapp-vscode.linkAttributeNames` 来支持更多的标签) 326 | * 添加新配置 `minapp-vscode.formatMaxLineCharacters` 可以指定格式化时每行最长的字符数`, close [61](https://github.com/qiu8310/minapp/issues/61) 327 | * 更新官方组件数据 328 | 329 | 1.0.14 / 2018-04-09 330 | ================== 331 | 332 | * 修复 pug 语言中,在单行的标签中,写 text 的时候也会触发属性补全 333 | 334 | 1.0.12 / 2018-04-05 335 | ================== 336 | 337 | * 支持 pug 语言 338 | 339 | 现在需要在 vue 的 template 上指定 `lang` 和 `minapp` 两个选项,如果不指定 `minapp`,默认为 `minapp="mpvue"` 340 | 341 | 如: 342 | 343 | 1. `