about summary refs log tree commit diff
path: root/modules/common/emacs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/common/emacs/default.nix1
-rw-r--r--modules/common/emacs/doom/config.el15
-rw-r--r--modules/common/emacs/doom/packages.el2
3 files changed, 18 insertions, 0 deletions
diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix
index 439a6bc..4d17e92 100644
--- a/modules/common/emacs/default.nix
+++ b/modules/common/emacs/default.nix
@@ -101,6 +101,7 @@ in {
                     libxml2 # :lang data :editor format
                     markdownlint-cli # :lang markdown
                     nil # :lang (nix +lsp)
+                    nls # :lang (nickel +lsp)
                     nodePackages.bash-language-server # :lang (sh +lsp)
                     nodePackages.eslint # :lang (json +lsp)
                     nodePackages.js-beautify # :lang web
diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el
index 70116f8..8fd2afc 100644
--- a/modules/common/emacs/doom/config.el
+++ b/modules/common/emacs/doom/config.el
@@ -122,6 +122,21 @@
 (setq lsp-haskell-formatting-provider "ormolu")
 
 ;;
+;;; Nickel
+;;
+
+(use-package! nickel-mode
+  :config
+  (after! lsp-mode
+    (add-to-list 'lsp-language-id-configuration '(nickel-mode . "nickel")
+      (lsp-register-client (make-lsp-client
+                             :new-connection (lsp-stdio-connection "nls")
+                             :activation-fn (lsp-activate-on "nickel")
+                             :server-id 'nls
+                             :major-modes 'nickel-mode)))
+    (add-hook 'nickel-mode-hook 'lsp-deferred)))
+
+;;
 ;;; YAML
 ;;
 
diff --git a/modules/common/emacs/doom/packages.el b/modules/common/emacs/doom/packages.el
index ba24eb8..cbd90ea 100644
--- a/modules/common/emacs/doom/packages.el
+++ b/modules/common/emacs/doom/packages.el
@@ -11,4 +11,6 @@
 
 (package! hledger-mode)
 
+(package! nickel-mode)
+
 (package! fcitx)

Consider giving Nix/NixOS a try! <3