fix(conform): use nixfmt for Nix, matching the environment - #10
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
conform.luaformatted Nix with alejandra, but the environment(hypatia-tile/dotfiles-mac, ADR 0012) dropped alejandra and standardized on
nixfmt-rfc-style. Confirmed on this machine:
alejandrais not on PATH,nixfmt1.3.1 is. So Nix format-on-save /<leader>fcurrently fails with amissing 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
nixfmtformatter invokes thenixfmtbinary on PATH, which inthis environment is nixfmt-rfc-style — so nvim and the dotfiles now agree.
Verification
Headless format of a scratch
.nixbuffer reformats correctly tonixfmt-rfc-style output.
stylua --checkandbin/checkpass.🤖 Generated with Claude Code