opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Promote oxfmt formatter from experimental to first-class

Open kynnyhsap opened this issue 13 hours ago • 0 comments

Problem

Currently, oxfmt requires the OPENCODE_EXPERIMENTAL_OXFMT environment variable to be enabled before it can be used as a formatter. This is unnecessarily restrictive for projects that already use oxfmt.

If a project has:

  • An .oxfmtrc.json or .oxfmtrc.jsonc config file, or
  • oxfmt in their package.json dependencies

...they've already made a deliberate choice to use oxfmt. Requiring an additional experimental flag adds friction without providing value.

Proposal

  1. Remove the experimental flag requirement from oxfmt detection
  2. Add config file detection (.oxfmtrc.json, .oxfmtrc.jsonc) - similar to how biome is detected
  3. Expand supported extensions to match oxfmt's full capabilities (JSON, CSS, HTML, YAML, Markdown, etc.)
  4. Keep the env var (marked as deprecated) for backward compatibility

References

  • oxfmt docs
  • oxfmt supported languages: JavaScript, JSX, TypeScript, TSX, JSON, JSONC, JSON5, YAML, TOML, HTML, Vue, CSS, SCSS, Less, Markdown, MDX, GraphQL

Implementation

PR: #8420

kynnyhsap avatar Jan 14 '26 10:01 kynnyhsap