diff --git a/config.org b/config.org index dddf733..99dd362 100644 --- a/config.org +++ b/config.org @@ -19,6 +19,8 @@ - [[#enable-proc-macro-support][Enable proc macro support]] - [[#cc][C/C++]] - [[#default-style][Default style]] + - [[#nix][Nix]] + - [[#formatting][Formatting]] - [[#org-mode][Org mode]] - [[#directory][Directory]] - [[#appearance][Appearance]] @@ -247,6 +249,16 @@ Setup the default format for C/C++ editing. (setq c-basic-offset 2)) #+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 ** Directory diff --git a/init.el b/init.el index e14c646..c0a94d5 100644 --- a/init.el +++ b/init.el @@ -55,7 +55,7 @@ (evil +everywhere); come to the dark side, we have cookies ;;file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding - ;;(format +onsave) ; automated prettiness + (format) ; automated prettiness ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim ;;multiple-cursors ; editing in many places at once