From 0b54c6103aa98037a091c801065eb80bae4b241c Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 4 Mar 2022 07:00:11 -0800 Subject: prog: add support for nix Enable the LSP for nix, and also ensure we're formatting the buffer when saving a buffer. --- emacs/custom/fcuny-prog.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/emacs/custom/fcuny-prog.el b/emacs/custom/fcuny-prog.el index 1e2141c..a3eec01 100644 --- a/emacs/custom/fcuny-prog.el +++ b/emacs/custom/fcuny-prog.el @@ -35,6 +35,7 @@ :commands (lsp lsp-deferred) :diminish lsp-mode :hook ((go-mode . lsp-deferred) + (nix-mode . lsp-deferred) (lsp-mode . (lambda() (let ((lsp-keymap-prefix "C-c l")) (lsp-enable-which-key-integration))))) :config @@ -163,4 +164,10 @@ ;; Show three lines of context around the current message (compilation-context-lines 3)) +(use-package nix-mode + :ensure t + :mode "\\.nix\\'" + :hook ((before-save . nix-format-before-save)) + :config) + (provide 'fcuny-prog) -- cgit 1.4.1