feature request: customizable formatters #590

Closed
opened 2026-02-16 17:27:31 -05:00 by yindo · 2 comments
Owner

Originally created by @rekram1-node on GitHub (Jul 9, 2025).

Originally assigned to: @thdxr on GitHub.

I know there are the experimental hooks, and then the built in formatters, but what if someone wants to use a formatter other than the standard?

Example: at my previous company we wrote a lot of Go and used gofumpt instead of gofmt. So it may be nice to have the option to override the formatter for Go (and other langs).

I also saw a PR for Kotlin formatting that has the same type of thing going on: https://github.com/sst/opencode/pull/612.

Maybe the intention here is to use hooks for other formatters that aren't out of the box supported by opencode but I feel like it could lend itself to being weird if an edit to a file triggered multiple different formatters at the same time which could have unexpected results.

So proposal:

Ability to specify / override formatters in opencode config.

Also as always, if this seems reasonable I am more than happy to open a PR.

Originally created by @rekram1-node on GitHub (Jul 9, 2025). Originally assigned to: @thdxr on GitHub. I know there are the experimental hooks, and then the built in formatters, but what if someone wants to use a formatter other than the standard? Example: at my previous company we wrote a lot of Go and used [gofumpt](https://github.com/mvdan/gofumpt) instead of gofmt. So it may be nice to have the option to override the formatter for Go (and other langs). I also saw a PR for Kotlin formatting that has the same type of thing going on: https://github.com/sst/opencode/pull/612. Maybe the intention here is to use hooks for other formatters that aren't out of the box supported by opencode but I feel like it could lend itself to being weird if an edit to a file triggered multiple different formatters at the same time which could have unexpected results. So proposal: **Ability to specify / override formatters in opencode config.** Also as always, if this seems reasonable I am more than happy to open a PR.
yindo closed this issue 2026-02-16 17:27:31 -05:00
Author
Owner

@izakfilmalter commented on GitHub (Jul 30, 2025):

This is a great default but super annoying if you are using something different. I use biome not prettier.

@izakfilmalter commented on GitHub (Jul 30, 2025): This is a great default but super annoying if you are using something different. I use biome not prettier.
Author
Owner

@rekram1-node commented on GitHub (Jul 31, 2025):

support for this was added in latest releass, closing

@rekram1-node commented on GitHub (Jul 31, 2025): support for this was added in latest releass, closing
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#590