]> git.eshelyaron.com Git - emacs.git/commit
Add treesit-simple-indent-standalone-predicate (bug#74386)
authorYuan Fu <casouri@gmail.com>
Mon, 2 Dec 2024 02:26:40 +0000 (18:26 -0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 14 Feb 2025 11:44:18 +0000 (12:44 +0100)
commit5b4dba22352de2d9221a731b39ff8f2d10197a45
tree56456f615b59f66ec0a1ee454caa3c10782c19ba
parent73d6c4b91e8547bef9d4f168a8425fe2a202f4a3
Add treesit-simple-indent-standalone-predicate (bug#74386)

* lisp/treesit.el:
(treesit-simple-indent-standalone-predicate): New variable.
(treesit-simple-indent-presets): Use the predicate.
(treesit-simple-indent-presets): Update docstring.
* lisp/progmodes/c-ts-common.el:
(c-ts-common--standalone-parent):
(c-ts-common--prev-standalone-sibling): Use the predicate if
non-nil.  Also, handle method chaining by default.
* doc/lispref/modes.texi (Parser-based Indentation): Add
documentation.

(cherry picked from commit 4b020b936c5adf472319d1ea253c85c5ee54135f)
doc/lispref/modes.texi
lisp/progmodes/c-ts-common.el
lisp/treesit.el