feat: add oxfmt option to experimental section#904
Merged
haoqunjiang merged 3 commits intovuejs:mainfrom Jan 21, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added the
formatting/oxfmtfolder 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
prettierand 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.