diff --git a/home-manager/modules/emacs/config.org b/home-manager/modules/emacs/config.org index 0526809..c78ce39 100644 --- a/home-manager/modules/emacs/config.org +++ b/home-manager/modules/emacs/config.org @@ -1371,6 +1371,15 @@ Add [[https://github.com/NixOS/nix-mode][nix-mode]] :hook (nix-mode . eglot-ensure)) #+end_src +Tell =nil= to use =nixpkgs-fmt= for formatting nix files. + +#+begin_src emacs-lisp + (with-eval-after-load 'eglot + (add-to-list 'eglot-server-programs + '(nix-mode . ("nil" :initializationOptions + `(:nil (:formatting (:command ("nixpkgs-fmt")))))))) +#+end_src + *** Common Lisp Common Lisp does not use =lsp-mode=, but has it's own environment: [[https://github.com/slime/slime][SLIME]] or Superior Lisp Interaction Mode for Emacs. diff --git a/home-manager/modules/emacs/default.nix b/home-manager/modules/emacs/default.nix index 5df8386..5d195a3 100644 --- a/home-manager/modules/emacs/default.nix +++ b/home-manager/modules/emacs/default.nix @@ -79,6 +79,7 @@ in nodePackages.bash-language-server aspell nil + nixpkgs-fmt python3 lldb ] ++