summary refs log tree commit diff
path: root/emacs/custom
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/custom')
-rw-r--r--emacs/custom/my-lang-nix.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/emacs/custom/my-lang-nix.el b/emacs/custom/my-lang-nix.el
new file mode 100644
index 0000000..9de5c50
--- /dev/null
+++ b/emacs/custom/my-lang-nix.el
@@ -0,0 +1,21 @@
+;;; my-lang-nix.el --- configure emacs for nix -*- lexical-binding: t -*-
+;; Author: Franck Cuny <franck@fcuny.net>
+
+;;; Commentary:
+
+;;; Code:
+
+(require '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))
+
+(add-hook 'nix-mode-hook #'lsp-deferred)
+
+(provide 'my-lang-nix)
+
+;;; my-lang-nix.el ends here