all repos — nixfiles @ 6b7692914ac786b910110872db59e762b40253f8

System and user configuration, managed by nix and home-manager

Emacs: improve nix indentation and make automatic

Alan Pearce
commit

6b7692914ac786b910110872db59e762b40253f8

parent

32bd166e364c68fb76c6748a3e5ee5d14982f02a

1 file changed, 5 insertions(+), 1 deletion(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -794,7 +794,11 @@ (setq-local indent-tabs-mode t)))
;;;; nix (with-eval-after-load 'nix-mode - (setq nix-indent-function #'nix-indent-line)) + (setq nix-mode-use-smie t + nix-indent-function #'smie-indent-line) + (general-add-hook 'nix-mode-hook + (lambda () + (add-hook 'before-save-hook #'nix-mode-format 0 'local)))) (use-package nix-update :commands (nix-update-fetch))