diff --git a/doom.d/config.el b/doom.d/config.el index b4908ae..d1f0dc3 100644 --- a/doom.d/config.el +++ b/doom.d/config.el @@ -332,6 +332,13 @@ work if it thinks it needs to." lsp-rust-analyzer-diagnostics-enable-experimental t lsp-rust-analyzer-display-chaining-hints t)) +(after! lsp-mode + (add-to-list 'lsp-language-id-configuration '(nix-mode . "nix")) + (lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection '("rnix-lsp")) + :major-modes '(nix-mode) + :server-id 'nix))) + (use-package! markdown-mode :mode ("README\\.md" . gfm-mode) :hook (markdown-mode . variable-pitch-mode) diff --git a/doom.d/config.org b/doom.d/config.org index d2da793..9d36a9b 100644 --- a/doom.d/config.org +++ b/doom.d/config.org @@ -514,6 +514,16 @@ Most of these are defaults, but I like having them explicit for my sanity lsp-rust-analyzer-diagnostics-enable-experimental t lsp-rust-analyzer-display-chaining-hints t)) #+end_src +** Nix +Use rnix-lsp +#+begin_src emacs-lisp +(after! lsp-mode + (add-to-list 'lsp-language-id-configuration '(nix-mode . "nix")) + (lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection '("rnix-lsp")) + :major-modes '(nix-mode) + :server-id 'nix))) +#+end_src * Composition Modes for handling plain text and prose ** Markdown diff --git a/home-manager/common/programs/emacs.nix b/home-manager/common/programs/emacs.nix index 243d38d..6793141 100644 --- a/home-manager/common/programs/emacs.nix +++ b/home-manager/common/programs/emacs.nix @@ -22,6 +22,10 @@ aspellDicts.en aspellDicts.en-science aspellDicts.en-computers + # For nix + rnix-lsp + manix + nix-doc # Desktop file for org-protocol (makeDesktopItem { name = "org-protocol";