]> git.eshelyaron.com Git - emacs.git/commit
Limit recursion level for tree-sitter imenu functions
authorYuan Fu <casouri@gmail.com>
Mon, 21 Nov 2022 00:56:33 +0000 (16:56 -0800)
committerYuan Fu <casouri@gmail.com>
Mon, 21 Nov 2022 01:04:58 +0000 (17:04 -0800)
commit32870d2f207536bb7932beeb2e0ec9a4e0146560
tree7178d8a11d9b575306118a3fddbcd39e284bb359
parent625ea08652053617034bf8ceee0d6cfae34f2dcc
Limit recursion level for tree-sitter imenu functions

Generating imenu index doesn't require going down to the bottom of the
tree (defun's are usually top-level).  Add limit so we don't go too
far down on very large buffers.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--imenu)
* lisp/progmodes/java-ts-mode.el (java-ts-mode--imenu)
* lisp/progmodes/js.el (js--treesit-imenu)
* lisp/progmodes/json-ts-mode.el (json-ts-mode--imenu)
* lisp/progmodes/python.el (python-imenu-treesit-create-index)
* lisp/textmodes/css-mode.el (css--treesit-imenu): Add limit to
treesit-induce-sparse-tree.
lisp/progmodes/c-ts-mode.el
lisp/progmodes/java-ts-mode.el
lisp/progmodes/js.el
lisp/progmodes/json-ts-mode.el
lisp/progmodes/python.el
lisp/textmodes/css-mode.el