nixfmt icon indicating copy to clipboard operation
nixfmt copied to clipboard

Escape sequences not handled properly

Open thefossguy opened this issue 10 months ago • 5 comments

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:

-      "^\Uf702" = "moveWordLeft:"; # Ctrl-<Left>
-      "^\Uf703" = "moveWordRight:"; # Ctrl-<Right>
+      "^Uf702" = "moveWordLeft:"; # Ctrl-<Left>
+      "^Uf703" = "moveWordRight:"; # Ctrl-<Right>

thefossguy avatar Apr 07 '24 15:04 thefossguy