emacs: be explicit about using nixpkgs-fmt
Alan Pearce alan@alanpearce.eu
Fri, 03 May 2024 11:49:16 +0200
1 files changed, 3 insertions(+), 2 deletions(-)
jump to
M user/emacs/init.el → user/emacs/init.el
@@ -1103,10 +1103,11 @@ :ghook 'prog-mode-hook :config (progn (setf (alist-get 'shfmt apheleia-formatters) '("shfmt")) - (setf (alist-get 'nixfmt apheleia-formatters) - '("nixpkgs-fmt")) + (setq apheleia-formatters (append apheleia-formatters '((nixpkgs-fmt "nixpkgs-fmt")))) (setf (alist-get 'go-ts-mode apheleia-mode-alist) '(goimports)) + (setq apheleia-mode-alist (append apheleia-mode-alist '((nix-ts-mode . nixpkgs-fmt) + (nix-mode . nixpkgs-fmt)))) (add-hook 'apheleia-mode-hook #'turn-off-format-all-mode)) :init (progn (apheleia-global-mode +1)))