Skip to content

Commit 13e9545

Browse files
authored
Merge pull request #71 from fstxz/zed-docs
Update Zed instructions
2 parents b93a47f + 69a9972 commit 13e9545

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,34 @@ To see other possible options, run `gdscript-format` without any arguments.
4545
4646
### Zed
4747

48-
First, install the [zed-gdscript](https://github.com/GDQuest/zed-gdscript) extension. This is needed to ensure that the formatter will only format GDScript files. Once installed, add the following JSON configuration to your `settings.json` file:
48+
1. Install the formatter (see instructions above).
49+
50+
2. Install [zed-gdscript](https://github.com/GDQuest/zed-gdscript) extension. This is needed to ensure that the formatter will only format GDScript files.
51+
52+
3. After installing the extension, add the following JSON configuration to your `settings.json` file:
4953

5054
```json
5155
{
5256
"languages": {
5357
"GDScript": {
5458
"formatter": {
5559
"external": {
56-
"command": "gdscript-format"
60+
"command": "gdscript-format",
61+
"arguments": []
5762
}
5863
}
5964
}
6065
}
6166
}
6267
```
6368

64-
If you renamed the binary to something else, adjust the `command` name accordingly. Once this is done, Zed will run the formatter every time you save a GDScript file. If this doesn't happen, ensure that the `format_on_save` setting in `settings.json` is set to `true` (this is the default). You can also format manually by executing `editor: format` command in Zed.
69+
4. If you renamed the binary to something else during installation, adjust the `command` name accordingly. It can also be a full path to the binary.
70+
71+
5. `arguments` is a comma separated list of flags. For example, to enable code reordering and use spaces instead of tabs, replace `[]` with `["--reorder-code", "--use-spaces"]`.
72+
73+
Once this is done, you can start using the formatter. By default Zed will run the formatter every time you save a file. If don't want this to happen, set the `format_on_save` setting in `settings.json` to `false`. To format manually, execute the `editor: format` command in Zed.
74+
75+
As a reminder: **don't leave this on when working on an important project without using a VCS!**.
6576

6677
### Helix
6778

0 commit comments

Comments
 (0)