Skip to content

Commit 57cd9bf

Browse files
authored
Nix Tree-Sitter tweak (#4285)
* Nix tree-sitter support The nix-ts-mode here requires some extra support: https://github.com/remi-gelinas/nix-ts-mode * ignore nix build output directories
1 parent 2fe0244 commit 57cd9bf

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

clients/lsp-nix.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
(lsp-register-client
4141
(make-lsp-client :new-connection (lsp-stdio-connection (lambda () lsp-nix-rnix-server-path))
42-
:major-modes '(nix-mode)
42+
:major-modes '(nix-mode nix-ts-mode)
4343
:server-id 'rnix-lsp
4444
:priority -1))
4545

@@ -79,7 +79,7 @@
7979

8080
(lsp-register-client
8181
(make-lsp-client :new-connection (lsp-stdio-connection (lambda () lsp-nix-nil-server-path))
82-
:major-modes '(nix-mode)
82+
:major-modes '(nix-mode nix-ts-mode)
8383
:initialized-fn (lambda (workspace)
8484
(with-lsp-workspace workspace
8585
(lsp--set-configuration

lsp-mode.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ the server has requested that."
408408
"[/\\\\]\\.terraform\\'"
409409
"[/\\\\]\\.terragrunt-cache\\'"
410410
;; nix-direnv
411+
"[/\\\\]\\result"
412+
"[/\\\\]\\result-bin"
411413
"[/\\\\]\\.direnv\\'")
412414
"List of regexps matching directory paths which won't be monitored when
413415
creating file watches. Customization of this variable is only honored at
@@ -914,6 +916,7 @@ Changes take effect only when a new session is started."
914916
(robot-mode . "robot")
915917
(racket-mode . "racket")
916918
(nix-mode . "nix")
919+
(nix-ts-mode . "Nix")
917920
(prolog-mode . "prolog")
918921
(vala-mode . "vala")
919922
(actionscript-mode . "actionscript")

0 commit comments

Comments
 (0)