You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 them a chore: I have to uncomment them, and then laboriously move them back to where they came from. I'd prefer if nixfmt just didn't move them around.
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 them a chore: I have to uncomment them, and then laboriously move them back to where they came from. I'd prefer if nixfmt just didn't move them around.I haven't been able to find a past discussion about this. I have not read the entire RFC, but https://github.com/nix-rfc-101/rfcs/blob/master/rfcs/0166-nix-formatting.md#comments does say:
Which (to my eyes) looks like it's talking about this use case (commenting/uncommenting code).
Small example input
(Yes this code is silly. It does reflect a simplified version of things that happen to me when I'm trashing about during development, though.)
Expected output
Actual output
Note how
unused = 42;
got moved out of thelet ... in
block. This is easier to see in gif form:The text was updated successfully, but these errors were encountered: