From 6fcfb9fc5d25764a57088c37b3187ad43b956304 Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 27 May 2024 10:02:15 +0800 Subject: [PATCH 1/2] doc: add the formatting instruction for VSCode extension --- packages/schema/README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/packages/schema/README.md b/packages/schema/README.md index 2c24ab102..ca88bc1fe 100644 --- a/packages/schema/README.md +++ b/packages/schema/README.md @@ -6,8 +6,32 @@ This VS Code extension provides code editing helpers for authoring ZenStack's sc ## Features -- Syntax highlighting +- Syntax highlighting of `*.zmodel` files + + - In case the schema file is not recognized automatically, add the following to your settings.json file: + + ```json + "files.associations": { + ... + "*.zmodel": "zmodel" + }, + ``` + - Auto formatting + + - To automatically format on save, add the following to your settings.json file: + + ```json + "editor.formatOnSave": true + ``` + + - To enable formatting in combination with prettier, add the following to your settings.json file: + ```json + "[zmodel]": { + "editor.defaultFormatter": "zenstack.zenstack" + }, + ``` + - Inline error reporting - Go-to definition - Hover documentation From 0410668613f2bca53bc4206ca7a9e12925c4692b Mon Sep 17 00:00:00 2001 From: JG Date: Mon, 27 May 2024 10:04:13 +0800 Subject: [PATCH 2/2] remove unnecessary code --- packages/schema/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/schema/README.md b/packages/schema/README.md index ca88bc1fe..60b1cf5bf 100644 --- a/packages/schema/README.md +++ b/packages/schema/README.md @@ -12,7 +12,6 @@ This VS Code extension provides code editing helpers for authoring ZenStack's sc ```json "files.associations": { - ... "*.zmodel": "zmodel" }, ```