Skip to content

feature request: customizable formatters #818

Closed

Description

@rekram1-node

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: #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.

Activity

  1. self-assigned this
    on Jul 10, 2025
  2. izakfilmalter commented on Jul 30, 2025

    @izakfilmalter

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

  3. rekram1-node commented on Jul 31, 2025

    @rekram1-node
    CollaboratorAuthor

    support for this was added in latest releass, closing

  4. added a commit that references this issue on Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions