From: Yuan Fu Date: Tue, 12 Sep 2023 01:06:23 +0000 (-0700) Subject: ; * lisp/treesit.el (treesit-explore-mode): Support local parsers. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b1c4089171331523d227a9ae13de00d38b49cb4f;p=emacs.git ; * lisp/treesit.el (treesit-explore-mode): Support local parsers. --- diff --git a/lisp/treesit.el b/lisp/treesit.el index 8371d0dda08..f65e2e02a7c 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -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