https://github.com/cnyballk/wxml-vscode
:space_invader:Vscode plugin -- wechat applets formatting and highlighting components (highly customized)
https://github.com/cnyballk/wxml-vscode
miniprogram weapp wechat wxml
Last synced: 4 months ago
JSON representation
:space_invader:Vscode plugin -- wechat applets formatting and highlighting components (highly customized)
- Host: GitHub
- URL: https://github.com/cnyballk/wxml-vscode
- Owner: cnyballk
- License: mit
- Archived: true
- Created: 2018-09-01T09:50:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-05T20:37:26.000Z (over 4 years ago)
- Last Synced: 2025-05-29T10:11:58.359Z (10 months ago)
- Topics: miniprogram, weapp, wechat, wxml
- Language: TypeScript
- Homepage:
- Size: 200 KB
- Stars: 35
- Watchers: 2
- Forks: 6
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-wechat-weapp - wxml - vscode插件--微信小程序格式化以及高亮组件(高度自定义) (插件)
- awesome-wechat-app - wxml - vscode插件--微信小程序格式化以及高亮组件(高度自定义) (插件)
- awesome-wechat-weapp - wxml - vscode插件--微信小程序格式化以及高亮组件(高度自定义) (插件)
- awesome-wechat-app - wxml - vscode插件--微信小程序格式化以及高亮组件(高度自定义) (插件)
README
# wxml-vscode
[wxml-vscode 仓库](https://github.com/cnyballk/wxml-vscode)
[提问题](https://github.com/cnyballk/wxml-vscode/issues)
该库我已不再维护,但需要的话可以提pr或者各自fork单独修改
## 安装
通过 F1 或者 CMD + Shift + P 输入 install. 选择: Install Extension.
## 特性
- 格式化功能
- 高亮组件功能
### 如何使用格式化功能
格式化 支持 通过 F1 或者 CMD + Shift + P 输入 format wxml 命令 或者右键菜单,也可以配置 wxmlConfig.onSaveFormat 开启保存后自动格式化
**example**
```html
123
123
```
wxmlConfig.format 无特殊说明的配置的属性可以[这里看](https://github.com/beautify-web/js-beautify)
```json
// 高亮的颜色,可设置每个组件的自定义颜色, tagName:color
// 例如 想渲染成黄色,可以添加字段 "custom":"yellow"
"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,
"wrap_attributes_count": 4,
"unformatted": "['text']",
"disable_automatic_closing_labels": false,
"preserve_newlines": true,
"wrap_attributes": "force-expand-multiline"
},
// 高亮所忽略的组件数组
"wxmlConfig.tagNoActiveArr": [
"view",
"button",
"text",
"icon",
"image",
"navigator",
"block",
"input",
"template",
"form",
"camera",
"textarea"
]
```
### Concat

### CHANGELOG
[查看版本更新](https://github.com/cnyballk/wxml-vscode/blob/master/CHANGELOG.md)
### LICENSE
[MIT](https://github.com/cnyballk/wxml-vscode/blob/master/LICENSE)