From 7c509e6f60584fce6f1899ef7816797d33c466fc Mon Sep 17 00:00:00 2001 From: Adam Hellberg Date: Sun, 16 Feb 2025 23:45:18 +0100 Subject: [PATCH] [doom] Configure Nix support --- doom/.config/doom/config.el | 9 +++++++++ doom/.config/doom/init.el | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index 4b9ced0..0525530 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -104,6 +104,15 @@ ;; numbers are disabled. For relative line numbers, set this to `relative'. (setq display-line-numbers-type 'relative) +;; Configure nix stuff to use alejandra +(set-formatter! 'alejandra '("alejandra" "--quiet") :modes '(nix-mode)) +(use-package! lsp-nix + :defer t + :custom (lsp-nix-nil-formatter ["alejandra" "--quiet"])) +(use-package! nix-mode + :defer t + :custom (nix-nixfmt-bin "alejandra")) + ;; If you use `org' and don't want your org files in the default location below, ;; change `org-directory'. It must be set before org loads! (setq diff --git a/doom/.config/doom/init.el b/doom/.config/doom/init.el index 033d2a5..33101cb 100644 --- a/doom/.config/doom/init.el +++ b/doom/.config/doom/init.el @@ -153,7 +153,7 @@ (lua +lsp +fennel +moonscript) ; one-based indices? one-based indices markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c - ;;nix ; I hereby declare "nix geht mehr!" + nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel (org +present +pretty +roam2 +journal) ; organize your plain life in plain text php ; perl's insecure younger brother -- 2.51.2