Skip to content

Commit

Permalink
feat(tools): add nix-ts-mode and tweak Eglot servers to run for it
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 26, 2023
1 parent 600691e commit 25b98eb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/me-tools.el
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@
(use-package nix-mode
:straight t)

(use-package nix-ts-mode
:straight t
:when (+emacs-features-p 'tree-sitter)
:mode "\\.nix\\'"
:config
;; Register Eglot servers on the `nix-ts-mode' in addition to the already configured `nix-mode'
(with-eval-after-load 'eglot
(when-let ((server (assoc 'nix-mode eglot-server-programs)))
(setcar server '(nix-mode nix-ts-mode)))))

(use-package nix-update
:straight t)

Expand Down

0 comments on commit 25b98eb

Please sign in to comment.