Formatting Team Meeting 2025-05-13
Team info
All meeting notes
Team attendees: @jfly @infinisil @MattSturgeon
Other attendees: @brianmcgee @zimbatm
Thanks to the treefmt team for attending this meeting!
Agenda & Notes
- @jfly:
- stdin support: `nix fmt` broken · Issue #301 · NixOS/nixfmt · GitHub
- The current behavior (read from stdin when no args are passed) is probably historical
- Let’s add a
--stdin
spec to treefmt, and updatenixfmt
to honor it:- If
--stdin
is specified, then you must pass exactly 1 argument: the filename - `treefmt --stdin` doesn't work if the underlying formatter cares about the real filename · Issue #573 · numtide/treefmt · GitHub
- If
- our installation/IDE configuration docs: Better installation/editor configuration instructions · Issue #303 · NixOS/nixfmt · GitHub
- This is definitely not a nixfmt issue, it’s arguably more general than treefmt, it’s kind of a nix usage issue.
- @brianmcgee is motivated to write a blog post about this
- @zimbatm: this is not a treefmt itssue, it’s a more of a direnv issue. He has spent a while explaining this to the Zed editor folks, and they’re on board with it.
- We discussed the relationship between nixpkg’s
treefmt.withConfig
andtreefmt-nix
: Proposal: upstream this project to nixpkgs · Issue #349 · numtide/treefmt-nix · GitHub
- stdin support: `nix fmt` broken · Issue #301 · NixOS/nixfmt · GitHub
- @emilazy asked for an update on Change formatting for `++`, `+` and `//` by Sereja313 · Pull Request #284 · NixOS/nixfmt · GitHub (addressing Appending an optional string / array causes the entire expression to be reformatted · Issue #228 · NixOS/nixfmt · GitHub)
- @piegames is swamped. @Sereja313 will chip away at this.
- Discusssed if this is a blocker for a stable 1.0 release. We decided not, but to highlight anticipated changes in the release notes, which can double as a call for help
- Regarding version numbering, we should consider our CLI to be our interface, e.g. uremoving a
--arg
would be a “breaking” change
- @brianmcgee mentioned:
nixfmt-tree
can be updated to no longer settree-root-file
oncetreefmt
’s next release is in nixpkgs (2.3? 2.2.2?) - Discussed some proposed formatting changes:
- @jfly to review treefmt: refactor `withConfig` and `buildConfig` to use `evalConfig` by MattSturgeon · Pull Request #406685 · NixOS/nixpkgs · GitHub