Conversation
The oxfmt language server maps the `angular` language id to the `component.html` extension, so it already formats Angular component templates. The extension never declared the language, so Zed never routed those buffers to the server. Adding `Angular` to the oxfmt `languages` list registers the server for the language contributed by the Angular extension, and the matching `language_ids` entry sends the `angular` language id the server expects. Oxlint is left unchanged: it does not lint Angular templates. Fixes oxc-project#138 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
The oxfmt language server already formats Angular component templates:
get_file_extension_from_language_idmaps the language idangularto thecomponent.htmlextension, which landed in oxc-project/oxc#20242 in answer to this issue. What was never done is the declaration on this side —[language_servers.oxfmt]listed neither the Angular language nor its language id, so Zed never routed those buffers to the server.Verified in a running editor, with the Angular extension installed. Opening
src/app/app.component.htmlnow sends this to the oxfmt server:{"method":"textDocument/didOpen","params":{"textDocument":{"uri":"…/app.component.html","languageId":"angular","version":0, …}}}Without the declaration the same file reaches oxfmt as
"languageId":"html", through theHTMLentry, and is formatted as plain HTML instead of an Angular template.Nothing is added for oxlint: it does not lint Angular templates, and its
language_idsentries play no part anyway, since the oxlint server resolves files by path rather than by language id.Closes #138
AI disclosure: implemented with Claude Code under my review; every change was tested and reviewed by me.
🤖 Generated with Claude Code