Repository navigation
Use the Vite+ Zed settings - #2413
Merged
Merged
Conversation
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 was formatting through an
externalcommand and had no lint server, while the docs already ask Zed users to installoxc-zed. This switches.zed/settings.jsonto the settings Vite+ generates for Zed, so format-on-save and inline lint come from the oxfmt and oxlint language servers, both readingvite.config.ts.{ - "format_on_save": "on", - "formatter": [{ "external": { "command": "pnpm", "arguments": ["exec", "vp", "fmt", "--stdin-filepath", "{buffer_path}"] } }], "lsp": { + "oxlint": { "initialization_options": { "settings": { "run": "onType", "typeAware": true, ... } } }, + "oxfmt": { "initialization_options": { "settings": { "fmt.configPath": "./vite.config.ts", "run": "onSave" } } }, "tailwindcss-language-server": { ... } }, "languages": { + // one entry per language Vite+ formats (17), each using the oxfmt language server + // JavaScript also runs source.fixAll.oxc "CSS": { "language_servers": ["tailwindcss-intellisense-css", "!vscode-css-language-server", "..."] } } }The Tailwind
lspblock and the CSSlanguage_serversoverride are kept from the old file. The CSS list gains"..."so the oxfmt and oxlint servers still start for CSS; without it Zed runs only the servers listed by name.Verified live: in Zed with
oxc-zed, format on save and inline lint.Merge Danger
Door: two-way
Impact: Zed users
Without the
oxc-zedextension, Zed no longer formats on save.docs/development.mdalready tells Zed users to install it.Related