]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/treesit.el (treesit-explore-mode): Support local parsers.
authorYuan Fu <casouri@gmail.com>
Tue, 12 Sep 2023 01:06:23 +0000 (18:06 -0700)
committerYuan Fu <casouri@gmail.com>
Tue, 12 Sep 2023 01:08:08 +0000 (18:08 -0700)
lisp/treesit.el

index 8371d0dda08d6e454e444ebb62a24bd3a1a7cf21..f65e2e02a7c7275ad3f33f8e27138e3d301d4cb0 100644 (file)
@@ -3109,10 +3109,12 @@ the text in the active region is highlighted in the explorer
 window."
   :lighter " TSexplore"
   (if treesit-explore-mode
-      (let ((language (intern (completing-read
-                               "Language: "
-                               (mapcar #'treesit-parser-language
-                                       (treesit-parser-list))))))
+      (let ((language
+             (intern (completing-read
+                      "Language: "
+                      (cl-remove-duplicates
+                       (mapcar #'treesit-parser-language
+                               (treesit-parser-list nil nil t)))))))
         (if (not (treesit-language-available-p language))
             (user-error "Cannot find tree-sitter grammar for %s: %s"
                         language (cdr (treesit-language-available-p