1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 20:30:32 -08:00
emacs/lisp/textmodes
Juri Linkov e9d17e4197 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).
2025-02-09 19:54:02 +02:00
..
artist.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
bib-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
bibtex-style.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
bibtex.el Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
conf-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
css-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
dns-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
emacs-authors-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
emacs-news-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
enriched.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
fill.el Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
flyspell.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
glyphless-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
html-ts-mode.el Improve treesit settings for {json,html,toml,yaml}-ts-mode (bug#73404) 2025-02-09 19:54:02 +02:00
ispell.el Avoid overly short timeout in ispell-help 2025-02-04 23:28:00 +01:00
less-css-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
makeinfo.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
mhtml-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
nroff-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
page-ext.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
page.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
paragraphs.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
picture.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
pixel-fill.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
po.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
refbib.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
refer.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
refill.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-auc.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-cite.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-dcr.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-global.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-index.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-parse.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-ref.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-sel.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-toc.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex-vars.el Remove support for supertabular from RefTeX 2025-01-08 20:47:43 +01:00
reftex.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
remember.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
rst.el Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
sgml-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
string-edit.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
table.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
tex-mode.el Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
texinfmt.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
texinfo.el Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
texnfo-upd.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
text-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
tildify.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
toml-ts-mode.el Improve treesit settings for {json,html,toml,yaml}-ts-mode (bug#73404) 2025-02-09 19:54:02 +02:00
two-column.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
underline.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
word-wrap-mode.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
yaml-ts-mode.el Improve treesit settings for {json,html,toml,yaml}-ts-mode (bug#73404) 2025-02-09 19:54:02 +02:00