From eeac89316312a809ac70a661cbb7b3dae94f6e57 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Fri, 4 Dec 2020 13:20:51 +0300 Subject: [PATCH] Add lsp --- modules/applications/emacs/default.nix | 1 + modules/applications/emacs/init.el | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/modules/applications/emacs/default.nix b/modules/applications/emacs/default.nix index 9f46546..61a4cd9 100644 --- a/modules/applications/emacs/default.nix +++ b/modules/applications/emacs/default.nix @@ -48,6 +48,7 @@ rust-mode go-mode edit-indirect + lsp-mode ]; }; diff --git a/modules/applications/emacs/init.el b/modules/applications/emacs/init.el index 426deb2..354a6af 100755 --- a/modules/applications/emacs/init.el +++ b/modules/applications/emacs/init.el @@ -217,4 +217,13 @@ If point was already at that position, move point to beginning of line." (setq inhibit-startup-screen t) +(use-package lsp-mode + :config + (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)) + ) + ;;; init.el ends here