Skip to content

Commit fe97241

Browse files
authored
doc: add the formatting instruction for VSCode extension (#1469)
1 parent ea105d1 commit fe97241

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

packages/schema/README.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,31 @@ This VS Code extension provides code editing helpers for authoring ZenStack's sc
66

77
## Features
88

9-
- Syntax highlighting
9+
- Syntax highlighting of `*.zmodel` files
10+
11+
- In case the schema file is not recognized automatically, add the following to your settings.json file:
12+
13+
```json
14+
"files.associations": {
15+
"*.zmodel": "zmodel"
16+
},
17+
```
18+
1019
- Auto formatting
20+
21+
- To automatically format on save, add the following to your settings.json file:
22+
23+
```json
24+
"editor.formatOnSave": true
25+
```
26+
27+
- To enable formatting in combination with prettier, add the following to your settings.json file:
28+
```json
29+
"[zmodel]": {
30+
"editor.defaultFormatter": "zenstack.zenstack"
31+
},
32+
```
33+
1134
- Inline error reporting
1235
- Go-to definition
1336
- Hover documentation

0 commit comments

Comments
 (0)