Skip to content

feat: add oxfmt option to experimental section#904

Merged
haoqunjiang merged 3 commits intovuejs:mainfrom
haoqunjiang:feat-oxfmt
Jan 21, 2026
Merged

feat: add oxfmt option to experimental section#904
haoqunjiang merged 3 commits intovuejs:mainfrom
haoqunjiang:feat-oxfmt

Conversation

@haoqunjiang
Copy link
Member

I added the formatting/oxfmt folder in the previous refactoring attempt, but didn't use it in the scaffolder.

Now, weeks later, oxfmt has added quite some new features. It now bundles prettier and plugins: https://github.com/oxc-project/oxc/blob/c1260cbef82efdbaddcef959ea1c75e48d15988f/apps/oxfmt/tsdown.config.ts#L15-L22 Its VS Code extension is able to format files other than JS(X)/TS(X).

So Oxfmt is now mutually exclusive to Prettier, and the template could be simplified.

As far as I've tested, it doesn't matter whether we use `.jsonc` or
`.json`. But the initial documentation said the default was `.json` for
the vscode extension
<oxc-project/oxc@8b322d4>

and documentation uses this path everywhere:
<https://oxc.rs/docs/guide/usage/formatter/editors.html>

In reality, the other default paths would be searched anyway:
<https://github.com/oxc-project/oxc/blob/786a505dc57bb09b9aa0b835dd781b70431b9901/crates/oxc_language_server/src/formatter/server_formatter.rs#L124-L133>

But I think it's better to keep it consistent with the documentation to
avoid confusion.

A small deviation to the current documentation:
no explicit configuration of `oxc.fmt.configPath` to avoid too much
configurations unless necessary.
@haoqunjiang haoqunjiang merged commit f5dc96a into vuejs:main Jan 21, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant