Skip to content

feat: support oxfmtrc and prettierrc for ArkTS formatting - #316

Open
tonycoder-hub wants to merge 2 commits into
ohosvscode:nextfrom
tonycoder-hub:cursor/formatter-config-lookup-9a9f
Open

tonycoder-hub wants to merge 2 commits into
ohosvscode:nextfrom
tonycoder-hub:cursor/formatter-config-lookup-9a9f

Conversation

@tonycoder-hub

Copy link
Copy Markdown

Fixes issue 261.
When formatting an .ets file, the language server walks upward and loads the nearest .oxfmtrc.json, .prettierrc.json, or package.json prettier object. Known keys are passed into the existing oxk format call.
Does not rewrite the formatter or touch issue 221 or 231. 17 formatter-config tests passed, including a live oxk check.

cursoragent and others added 2 commits August 18, 2026 04:58
Look up the nearest .oxfmtrc.json(c), .prettierrc.json(c), .prettierrc, or package.json prettier field and pass those options to oxk format() without upgrading the oxc-ark toolchain.

Co-authored-by: Tony Coder <407243179@qq.com>
Also fix quote-style lint in the JSONC comment stripper.

Co-authored-by: Tony Coder <407243179@qq.com>
@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: af14583

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@arkts/language-server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

2 participants