Enable alejandra for Nix formatting

This commit is contained in:
Antoine Martin 2022-04-10 11:58:04 +02:00
parent a5a93adb85
commit 1dac032fe9
2 changed files with 13 additions and 1 deletions

View file

@ -19,6 +19,8 @@
- [[#enable-proc-macro-support][Enable proc macro support]] - [[#enable-proc-macro-support][Enable proc macro support]]
- [[#cc][C/C++]] - [[#cc][C/C++]]
- [[#default-style][Default style]] - [[#default-style][Default style]]
- [[#nix][Nix]]
- [[#formatting][Formatting]]
- [[#org-mode][Org mode]] - [[#org-mode][Org mode]]
- [[#directory][Directory]] - [[#directory][Directory]]
- [[#appearance][Appearance]] - [[#appearance][Appearance]]
@ -247,6 +249,16 @@ Setup the default format for C/C++ editing.
(setq c-basic-offset 2)) (setq c-basic-offset 2))
#+END_SRC #+END_SRC
** Nix
*** Formatting
Use [[https://github.com/kamadorueda/alejandra][alejandra]] to format Nix code.
#+begin_src emacs-lisp
(set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))
#+end_src
* Org mode * Org mode
** Directory ** Directory

View file

@ -55,7 +55,7 @@
(evil +everywhere); come to the dark side, we have cookies (evil +everywhere); come to the dark side, we have cookies
;;file-templates ; auto-snippets for empty files ;;file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness (format) ; automated prettiness
;;god ; run Emacs commands without modifier keys ;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim ;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once ;;multiple-cursors ; editing in many places at once