<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apheleia.git/test/formatters/samplecode/oxfmt/in.ts, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/apheleia.git/'/>
<entry>
<title>Add support for oxfmt formatter (#382)</title>
<updated>2025-12-13T20:23:25+00:00</updated>
<author>
<name>Mike Olson</name>
<email>me@mwolson.org</email>
</author>
<published>2025-12-13T20:23:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.tews.dev/cgit/apheleia.git/commit/?id=8a6b75008d0cb5c5dabb08281ad2393ba4341d1c'/>
<id>8a6b75008d0cb5c5dabb08281ad2393ba4341d1c</id>
<content type='text'>
## Summary

- Add oxfmt (Oxc Formatter) as a new formatter option for JavaScript and
TypeScript files

## Details

[Oxfmt](https://oxc.rs/docs/guide/usage/formatter) is a Rust-powered,
Prettier-compatible code formatter from the Oxc project. It's currently
in alpha but offers significant performance improvements (30x+ faster
than Prettier).

Key points:
- Uses `inplace` mode since oxfmt doesn't support stdin/stdout
- Works with all common JS/TS extensions (.js, .jsx, .mjs, .cjs, .ts,
.tsx, .mts)
- Not added to `apheleia-mode-alist` - users can opt-in by setting
`apheleia-formatter` to `oxfmt`
- Defaults are already sensible: 2-space indent, printWidth 100, no tabs

Example usage:
```elisp
(setf (alist-get 'oxfmt apheleia-formatters)
      '("apheleia-npx" "oxfmt" inplace))

;; To use for JS/TS files:
(setq-default apheleia-formatter 'oxfmt)
;; Or per-mode:
(setf (alist-get 'typescript-ts-mode apheleia-mode-alist) 'oxfmt)
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
## Summary

- Add oxfmt (Oxc Formatter) as a new formatter option for JavaScript and
TypeScript files

## Details

[Oxfmt](https://oxc.rs/docs/guide/usage/formatter) is a Rust-powered,
Prettier-compatible code formatter from the Oxc project. It's currently
in alpha but offers significant performance improvements (30x+ faster
than Prettier).

Key points:
- Uses `inplace` mode since oxfmt doesn't support stdin/stdout
- Works with all common JS/TS extensions (.js, .jsx, .mjs, .cjs, .ts,
.tsx, .mts)
- Not added to `apheleia-mode-alist` - users can opt-in by setting
`apheleia-formatter` to `oxfmt`
- Defaults are already sensible: 2-space indent, printWidth 100, no tabs

Example usage:
```elisp
(setf (alist-get 'oxfmt apheleia-formatters)
      '("apheleia-npx" "oxfmt" inplace))

;; To use for JS/TS files:
(setq-default apheleia-formatter 'oxfmt)
;; Or per-mode:
(setf (alist-get 'typescript-ts-mode apheleia-mode-alist) 'oxfmt)
```</pre>
</div>
</content>
</entry>
</feed>
