]> git.eshelyaron.com Git - emacs.git/commit
Add tree-sitter imenu support for js-mode and ts-mode
authorYuan Fu <casouri@gmail.com>
Wed, 26 Oct 2022 22:36:15 +0000 (15:36 -0700)
committerYuan Fu <casouri@gmail.com>
Wed, 26 Oct 2022 22:36:15 +0000 (15:36 -0700)
commit6fb6cb075f05629a562275064851bef6b72d5dd2
tree4d556e02028ad01dd628a6642b1ef381e04a20fc
parent734df28368c7f7c21b1068a67d4ae89e64d4a3d3
Add tree-sitter imenu support for js-mode and ts-mode

js-mode's current imenu is pretty plain and incomplete, so I took the
liberty to add a bit more flair to it.

* lisp/progmodes/js.el (js--treesit-imenu-type-alist): New variable.
(js--treesit-imenu-top-level-p)
(js--treesit-imenu-label)
(js--treesit-imenu-1)
(js--treesit-imenu): New functions.
lisp/progmodes/js.el
lisp/progmodes/ts-mode.el