nixfmt icon indicating copy to clipboard operation
nixfmt copied to clipboard

Support for floats without a leading zero

Open nagy opened this issue 2 years ago • 0 comments

The file default.nix :

{
  hello = .9;
}

gives:

$ nixfmt default.nix
default.nix:2:13:
  |
2 |   hello = .9;
  |             ^
unexpected ';'
expecting expression

An even simpler testcase is: nixfmt <(echo '.1')

nixfmt may want to prepend a leading zero in this case for consistency.

nagy avatar May 06 '22 10:05 nagy