nixfmt icon indicating copy to clipboard operation
nixfmt copied to clipboard

The official (but not yet stable) formatter for Nix code

Results 67 nixfmt issues
Sort by recently updated
recently updated
newest added

For pre-commit hooks and such, would be nice if the releases provided binaries for the most common platforms.

### Description In the same spirit as `--width` (default 100) allowing end-users outside of nixpkgs to tweak nixfmt's behavior, I'd like an option to disable the default formatting of non-singleton...

The current Nixpkgs diff report is [rather sparse](https://github.com/NixOS/nixfmt/pull/186#issuecomment-2038630485), we should improve it.

### Description It appears that `nixfmt` does not preserve backslashes. I have the following two lines in my `darwin.nix`: https://github.com/thefossguy/prathams-nixos/blob/6acda3f9c27516b81a29d718ea1cb3b1025f86b6/nixos-configuration/home-manager/darwin.nix#L56-L57 And this got mangled like so: ```diff - "^\Uf702" =...

bug
correctness

### Description I often comment/uncomment swaths of code when developing. Since adopting `nixfmt`, I've found that sometimes those lines of code move around when I comment them, which makes uncommenting...

### Description I want to use `--width 80` but it seems to not actually matter what value I pass, in the below example, the output is always the input. ###...

Some [general-purpose formatting tools](https://github.com/purcell/emacs-reformatter) prefer language-specific formatting tools to write to stdout: > By default, reformatter.el expects programs to read from stdin and write to stdout, and you should prefer...

This kind-of-but-not really supersedes #254. It doesn't explicitly touch on list expansion itself, however the part 2 commit implicitly doesn't force-expand last list arguments anymore by virtue of not absorbing...