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

Currently passing the argument `-` does not try to read the "file" from standard input. E.g.: ``` nixfmt - < flake.nix ``` This is a common standard as suggested per...

### Description Nixfmt (sometimes?) converts strings to double single quote form. For certain strings, the transformation is incorrect. No transformation at all would be preferrable. ### Small example input ```...

bug

When I have a symlink and pass it to `nixfmt` (eg because of using globbing from the shell as in `nixfmt **/*.nix`) it gets overwritten by a regular file containing...

bug

The file `default.nix` : ``` { hello = .9; } ``` gives: ``` $ nixfmt default.nix default.nix:2:13: | 2 | hello = .9; | ^ unexpected ';' expecting expression ```...

Consider this `default.nix` file: ```nix rec { first."hello/there" = 123; second = { inherit (first) "hello/there"; }; } ``` It is valid: ```sh $ nix-instantiate --eval default.nix -A second.hello/there 123...

bug

### Description It'd be nice to have a way to disable formatting with a comment directive such as https://github.com/nix-community/nixpkgs-fmt/issues/265. If this were added I'd probably switch from using `nixpkgs-fmt`. ###...

enhancement

Still seems to work fine, and in fact it seems it's really a warning, but Nix shows it as an error so it looks more concerning than it probably is....

bug
help wanted
low-prio

User report: > I set up treefmt for my editor and nixfmt fails formatting without any obvious sign. > Maybe the spec is incomplete, but I think it had to...

It'd be really great if I could hook up a GitHub Action with nixfmt so it provided annotations to the code about reformatting that needs doing.

enhancement
good first issue