Conversation
Zed resolves the formatter from the per-language `formatter` setting, whose default `auto` prefers Prettier and otherwise takes the first language server offering formatting. For JavaScript, TypeScript, TSX and Vue.js the built-in `vtsls` also formats, so an unconfigured project does not format with Oxfmt and ignores `.oxfmtrc.json`. The README pointed at the examples directory without stating this, leaving the required setting undiscoverable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Zed resolves the formatter from the per-language
formattersetting. Its default,auto, uses Prettier when the language allows it and otherwise the first language server that advertises formatting support (Formatter::Autoincrates/project/src/lsp_store.rs). For JavaScript, TypeScript, TSX and Vue.js, Zed's defaults both allow Prettier and start the built-invtsls, which formats as well — so an unconfigured project does not format with Oxfmt, and.oxfmtrc.jsonhas no effect, without anything reporting it.The settings that fix this are already in this repository:
examples/oxfmtandexamples/bothname oxfmt for every language they cover and disallow Prettier there. The README pointed at the examples directory without stating the problem they solve, which left the required setting undiscoverable. This adds a short section saying what decides the formatter and showing the block for one language.On the other half of #212 — the extension advertising itself as the preferred formatter — that is not expressible today:
Formatter::Currenttakes the first server that advertises formatting, with no preference mechanism, andLanguageServerManifestEntrycarries onlylanguages,language_idsandcode_action_kinds. Arequire_config_fileoption is being discussed in #29, where it belongs.One correction to the report, for whoever picks this up: on current Zed,
autofor those languages resolves to Prettier rather than tovtsls;vtslswins only where Prettier is disallowed or unavailable. The wording added here covers both paths and claims neither.Documentation only, no behaviour change.
AI disclosure: written with Claude Code under my review.
🤖 Generated with Claude Code