Add baseline tree-sitter indent rule for C-like languages
I found a really good baseline indent rule that handles a wide
range of situations very well. Now major modes can just start
with this rule and add exceptions on top.
This is worth mentioning in the manual, but that'll be a large
change, and doesn't have to be included in this commit.
* lisp/progmodes/c-ts-common.el:
(c-ts-common-list-indent-style): New variable.
(c-ts-common--standalone-parent):
(c-ts-common--prev-standalone-sibling):
(c-ts-common-parent-ignore-preproc):
(c-ts-common-baseline-indent-rule): New function.
* lisp/treesit.el (treesit--indent-prev-line-node): New function.
(treesit-simple-indent-presets): Add new preset.
(cherry picked from commit
e37cd4fa597beaec3b491edb1b15ea0c19e72be4)