]>
git.eshelyaron.com Git - emacs.git/commit
Update tree-sitter major modes to use the new Imenu facility
See previous commit for more explanation.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--defun-name): Handle more
types.
(c-ts-mode--imenu-1)
(c-ts-mode--imenu): Remove functions.
(c-ts-base-mode): Setup Imenu.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--imenu-1)
(csharp-ts-mode--imenu): Remove functions.
(csharp-ts-mode): Setup Imenu.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--imenu-1)
(java-ts-mode--imenu): Remove functions.
(java-ts-mode): Setup Imenu.
* lisp/progmodes/js.el (js--treesit-imenu-1)
(js--treesit-imenu): Remove functions.
(js--treesit-valid-imenu-entry): New function.
(js-ts-mode): Setup Imenu.
* lisp/progmodes/json-ts-mode.el (json-ts-mode--defun-name): Trim the
quotes.
(json-ts-mode--imenu-1)
(json-ts-mode--imenu): Remove functions.
(json-ts-mode): Setup Imenu.
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--imenu)
(rust-ts-mode--imenu-1): Remove functions.
(rust-ts-mode): Setup Imenu.
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-base-mode): Remove treesit-defun-prefer-top-level, it's
not used anymore. Setup Imenu. Setup treesit-defun-name-function.
* lisp/textmodes/css-mode.el (css--treesit-imenu-1)
(css--treesit-imenu): Remove functions.
(css-ts-mode): Setup Imenu.
* lisp/textmodes/toml-ts-mode.el (toml-ts-mode--defun-name): Fix it
and add a fallback.
(toml-ts-mode--imenu-1)
(toml-ts-mode--imenu): Remove functions.
(toml-ts-mode): Setup Imenu.