[Emacs] Run alejandra automatically

This commit is contained in:
Ivan Malison 2023-12-16 13:46:53 -07:00
parent 6b8789d566
commit 0aa212b83d
2 changed files with 8 additions and 0 deletions

View File

@ -2622,6 +2622,13 @@ eval-last-sexp.
(shell-command-to-string "nix eval -I \"$NIX_PATH\" --expr '<nixpkgs>' --impure")))) (shell-command-to-string "nix eval -I \"$NIX_PATH\" --expr '<nixpkgs>' --impure"))))
:config :config
(progn (progn
(use-package apheleia
:demand t
:config
(progn
(add-to-list 'apheleia-formatters '(alejandra . ("alejandra")))
(setf (alist-get 'nix-mode apheleia-mode-alist)
'(alejandra))))
(setq nix-indent-function 'nix-indent-line))) (setq nix-indent-function 'nix-indent-line)))
(use-package lsp-nix (use-package lsp-nix

View File

@ -57,6 +57,7 @@ makeEnable config "modules.code" true {
# nix # nix
nixd nixd
nil nil
alejandra
] ++ (if pkgs.system == "x86_64-linux" then with pkgs; [ ] ++ (if pkgs.system == "x86_64-linux" then with pkgs; [
# purescript # purescript
purescript purescript