Skip to content

feat: declare angular support for oxfmt - #262

Open
KuSh wants to merge 1 commit into
oxc-project:mainfrom
KuSh:feat/oxfmt-angular-language
Open

KuSh wants to merge 1 commit into
oxc-project:mainfrom
KuSh:feat/oxfmt-angular-language

Conversation

@KuSh

@KuSh KuSh commented Sep 20, 2026

Copy link
Copy Markdown

Summary

The oxfmt language server already formats Angular component templates: get_file_extension_from_language_id maps the language id angular to the component.html extension, 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.html now 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 the HTML entry, 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_ids entries 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

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

No deployments
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.

Add Angular to supported languages for oxfmt

1 participant