summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2025-02-09 19:54:02 +0200
committerJuri Linkov <juri@linkov.net>2025-02-09 19:54:02 +0200
commite9d17e41971c887675d52e1dcee21978d4247130 (patch)
tree5b19ea808546814c96243419fb547f7b34c21724 /lisp/emacs-lisp/bytecomp.el
parent7e60ceeccbca1b9f67297ad7e9f11fd498b28d4d (diff)
downloademacs-e9d17e41971c887675d52e1dcee21978d4247130.tar.gz
emacs-e9d17e41971c887675d52e1dcee21978d4247130.tar.bz2
emacs-e9d17e41971c887675d52e1dcee21978d4247130.zip
Improve treesit settings for {json,html,toml,yaml}-ts-mode (bug#73404)
* lisp/progmodes/json-ts-mode.el (json-ts-mode): Add 'list' thing to 'treesit-thing-settings'. (json-ts-mode): Disable outlines. * lisp/textmodes/html-ts-mode.el (html-ts-mode--defun-name): Get a grandchild 'tag_name' from 'element' that was already defined by 'treesit-defun-type-regexp'. (html-ts-mode--outline-predicate): New function. (html-ts-mode): Add "comment" to the 'list' thing in 'treesit-thing-settings'. Use "tag_name" and "attribute" in 'sentence' to conform to sentence navigating arguments in other ts-modes. Remove unnecessary heading from 'treesit-simple-imenu-settings' and use "element" supported by 'html-ts-mode--defun-name'. Set 'treesit-outline-predicate' to 'html-ts-mode--outline-predicate'. * lisp/textmodes/toml-ts-mode.el (toml-ts-mode): Add 'treesit-thing-settings'. * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--defun-name) (yaml-ts-mode--outline-predicate): New functions. (yaml-ts-mode): Set 'treesit-defun-type-regexp', 'treesit-defun-name-function', 'treesit-defun-tactic'. Add 'sentence' to 'treesit-thing-settings'. Set 'treesit-simple-imenu-settings' and 'treesit-outline-predicate'. Use 'kill-local-variable' for 'forward-sexp-function' and 'show-paren-data-function' instead of resetting their value. * lisp/treesit.el (treesit-outline-search): Check for the thing before the end of the line to support such case when the thing fits on the current line and ends before the end of the line such as e.g. '<h1>...</h1>' in html-ts-mode. (treesit-hs-find-next-block, treesit-hs-inside-comment-p): Use anchors for "\\`comment\\'" (bug#75609).
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
0 files changed, 0 insertions, 0 deletions