Skip to content

Commit 61e7bcb

Browse files
committed
Add instructions for Zed to readme
1 parent 208d86c commit 61e7bcb

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You can find binaries for Windows, macOS, and Linux in the [releases tab](https:
2020

2121
To format a file, run:
2222

23-
```
23+
```bash
2424
gdscript-format path/to/file.gd
2525
```
2626

@@ -30,6 +30,33 @@ Format with check mode, to use in a build system (exit code 1 if changes needed)
3030
gdscript-format --check path/to/file.gd
3131
```
3232

33+
To see other possible options, run `gdscript-format` without any arguments.
34+
35+
## Using the formatter in code editors
36+
37+
> [!NOTE]
38+
> If you managed to make the formatter work in a code editor that isn't listed here, consider contributing to this section or sharing your findings in [this](https://github.com/GDQuest/GDScript-formatter/issues/26) issue.
39+
40+
### Zed
41+
42+
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:
43+
44+
```json
45+
{
46+
"languages": {
47+
"GDScript": {
48+
"formatter": {
49+
"external": {
50+
"command": "gdscript-format"
51+
}
52+
}
53+
}
54+
}
55+
}
56+
```
57+
58+
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.
59+
3360
## Status
3461

3562
09/18/2025 - The formatter now has many formatting rules implemented and is ready to test. It includes:

0 commit comments

Comments
 (0)