]> git.eshelyaron.com Git - emacs.git/commit
Add treesit-explore-mode
authorYuan Fu <casouri@gmail.com>
Wed, 16 Nov 2022 04:29:07 +0000 (20:29 -0800)
committerYuan Fu <casouri@gmail.com>
Wed, 16 Nov 2022 22:40:37 +0000 (14:40 -0800)
commit306e49285a04c02f0a575a7d7b2f82eeb032c86b
tree4640e3aa8ed6e24422a54171a7e9032e12c2312f
parentd1ef0243eb6e7cd9720236eb0e900fe7163b3c2b
Add treesit-explore-mode

This mode is basically the tree-sitter playground[1] in Emacs:
displays the syntax tree with the source side-by-side, kept in sync in
real-time.

[1] https://tree-sitter.github.io/tree-sitter/playground

* doc/lispref/parsing.texi (Language Definitions): Mention in manual.
* lisp/treesit.el (treesit--explorer-buffer)
(treesit--explorer-source-buffer)
(treesit--explorer-language)
(treesit--explorer-refresh-timer)
(treesit--explorer-highlight-overlay)
(treesit--explorer-last-node): New variables.
* lisp/treesit.el (treesit--explorer--nodes-to-highlight)
(treesit--explorer-refresh)
(treesit--explorer-post-command)
(treesit--explorer-jump)
(treesit--explorer-highlight-node)
(treesit--explorer-draw-node): New functions.
(treesit--explorer-tree-mode)
(treesit-explore-mode): New modes.
doc/lispref/parsing.texi
lisp/treesit.el