1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 16:51:06 -07:00

; * lisp/treesit.el (treesit-explore-mode): Support local parsers.

This commit is contained in:
Yuan Fu 2023-09-11 18:06:23 -07:00
parent e25ad6e2a3
commit b1c4089171
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View 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