Skip to content

fix(conform): use nixfmt for Nix, matching the environment - #10

Merged
hypatia-tile merged 1 commit into
mainfrom
fix/nix-formatter-nixfmt
Jul 25, 2026
Merged

fix(conform): use nixfmt for Nix, matching the environment#10
hypatia-tile merged 1 commit into
mainfrom
fix/nix-formatter-nixfmt

Conversation

@hypatia-tile

Copy link
Copy Markdown
Owner

conform.lua formatted Nix with alejandra, but the environment
(hypatia-tile/dotfiles-mac, ADR 0012) dropped alejandra and standardized on
nixfmt-rfc-style. Confirmed on this machine: alejandra is not on PATH,
nixfmt 1.3.1 is. So Nix format-on-save / <leader>f currently fails with a
missing formatter (or, if any alejandra lingered, would churn against the
dotfiles' nixfmt output).

Change

  • lua/plugins/conform.lua: nix = { "alejandra" }nix = { "nixfmt" }.
  • CLAUDE.md: doc updated (Nix formatter is nixfmt).

conform's nixfmt formatter invokes the nixfmt binary on PATH, which in
this environment is nixfmt-rfc-style — so nvim and the dotfiles now agree.

Verification

Headless format of a scratch .nix buffer reformats correctly to
nixfmt-rfc-style output. stylua --check and bin/check pass.

🤖 Generated with Claude Code

conform formatted Nix with `alejandra`, but the environment (dotfiles-mac,
ADR 0012) dropped alejandra and standardized on nixfmt-rfc-style. alejandra
is no longer on PATH, so Nix format-on-save / <leader>f failed with a
missing formatter; where it did run it would fight the dotfiles' nixfmt
formatting. Switch to conform's `nixfmt` formatter, which invokes the
`nixfmt` binary on PATH (nixfmt-rfc-style). Verified: it reformats a .nix
buffer correctly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hypatia-tile
hypatia-tile merged commit e0ea3db into main Jul 25, 2026
2 checks passed
@hypatia-tile
hypatia-tile deleted the fix/nix-formatter-nixfmt branch July 25, 2026 07:17
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.

1 participant