Closed sir4ur0n closed 1 year ago
I fix it locally by adding the hook by myself for now https://github.com/15cm/spacemacs-config/commit/6d494d6f529a1804d848539264e088c2d8daa8be
(add-hook 'before-save-hook 'nix-format-before-save)
this could be fixed by adding
:commands nixfmt-on-save-mode
to the use-package call
I think the root cause is https://github.com/NixOS/nix-mode/commit/c18a24e9ac569a221e88ba9d74d52c7b02b6eb77
If I'm not mistaken, nixfmt-on-save-mode
was reverted (reformatter-define nixfmt
) and instead one now must use nix-format-before-save
(the same command @15cm uses in his hack).
So the actual fix for Spacemacs is to revert https://github.com/syl20bnr/spacemacs/commit/821bd9cc683575af0996c8e2b3e42452bb9c684a
I will open a PR to fix this.
Description :octocat:
When opening a Nix file, I get this error:
Reproduction guide :beetle:
Observed behaviour: :eyes: :broken_heart:
Expected behaviour: :heart: :smile: No error.
System Info :computer:
Backtrace :paw_prints:
N/A.