]> git.eshelyaron.com Git - emacs.git/commit
Make tree-sitter-explorer support selecting local parser
authorYuan Fu <casouri@gmail.com>
Tue, 3 Dec 2024 01:23:08 +0000 (17:23 -0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 6 Dec 2024 15:42:38 +0000 (16:42 +0100)
commitd19ce8e2ff61d16a0194b97c5f9395128f94948e
tree14e9137c58ddd90f757f322f97bfea838b440fa1
parent4ec51cba6ef264f0567096b4f7596fbb71a304d2
Make tree-sitter-explorer support selecting local parser

Now treesit-explore-mode will prompt the user to select a parser
to explore, rather than a language.  It'll also include the
local parsers at point for selection.

* lisp/treesit.el (treesit--explorer-language): Change to
treesit--explorer-parser.
(treesit--explorer--nodes-to-highlight):
(treesit--explorer-refresh): Change to use parser.
(treesit--explorer-generate-parser-alist): New function.
(treesit-explorer-switch-parser): New command.
(treesit-explore-mode): Use switch-parser to setup.
* doc/lispref/parsing.texi (Language Grammar): Mention
treesit-explorer-switch-parser.

(cherry picked from commit 10b4d3045e1b856009c5ac1e1a1ca257f2d4493f)
doc/lispref/parsing.texi
lisp/treesit.el