diff options
author | Franck Cuny <franck@fcuny.net> | 2022-09-17 14:25:39 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-09-17 14:25:39 -0700 |
commit | febc80e812bbb28af467751d487cf4d2e2d63c90 (patch) | |
tree | cb4b2b2daef9c0f5cde863f7486df04ed7a9cf6a /emacs/custom | |
parent | ref(tree-sitter): move the configuration to its own file (diff) | |
download | emacs.d-febc80e812bbb28af467751d487cf4d2e2d63c90.tar.gz |
feat(lang/nix): configure Emacs for nix
Change-Id: I4e92859e96362268431bde6dd4a81f73a8796b0d
Diffstat (limited to 'emacs/custom')
-rw-r--r-- | emacs/custom/my-lang-nix.el | 21 |
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 |