]> git.eshelyaron.com Git - emacs.git/commit
Embed html, yaml and toml in markdown-ts-mode.
authorJuri Linkov <juri@linkov.net>
Thu, 1 May 2025 18:23:33 +0000 (21:23 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 10 May 2025 06:55:09 +0000 (08:55 +0200)
commita83b67bb4174cbb125bee3a920ac98344f36facb
treecb994e1760beb0d5a07da489d838d00b82ccfab9
parent1922fc65eb8506ffb4a17edc2ef1775204c700b1
Embed html, yaml and toml in markdown-ts-mode.

* lisp/textmodes/markdown-ts-mode.el (markdown-ts--treesit-settings):
Use @italic on the whole 'block_quote'.
(markdown-ts-outline-predicate): New function.
(markdown-ts--range-settings): Embed 'yaml' in host 'markdown',
embed 'toml' in host 'markdown', embed 'html' in host 'markdown-inline',
and use local 'html_block'.
(markdown-ts-setup): Append html/yaml/toml to treesit-font-lock-settings
and treesit-font-lock-feature-list when their grammars are ready.
(markdown-ts-mode): Set comment-start/comment-end.
Set treesit-outline-predicate to 'markdown-ts-outline-predicate'.

* lisp/textmodes/toml-ts-mode.el
(toml-ts-mode--font-lock-feature-list): New variable.
(toml-ts-mode): Use it.

* lisp/textmodes/yaml-ts-mode.el
(yaml-ts-mode--font-lock-feature-list): New variable.
(yaml-ts-mode): Use it.
(yaml-ts-mode--outline-nodes): New variable.
(yaml-ts-mode--outline-predicate): Use it.

* lisp/treesit-x.el (liquid-generic-ts-mode):
Use 'treesit-ready-p' on optional 'yaml' grammar.
Merge 'yaml-ts-mode--font-lock-feature-list'.

(cherry picked from commit 1b0fe9b387ee4021b86f6fb120f5f7ed05367a9d)
lisp/textmodes/markdown-ts-mode.el
lisp/textmodes/toml-ts-mode.el
lisp/textmodes/yaml-ts-mode.el
lisp/treesit-x.el