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:
parent
e25ad6e2a3
commit
b1c4089171
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue