File: c-ts-common.el.html
This file contains functions that can be shared by C-like language major modes, like indenting and filling "/* */" block comments.
For indenting and filling comments:
- Use c-ts-common-comment-setup to setup comment variables and
filling.
- Use simple-indent matcher c-ts-common-looking-at-star and
anchor c-ts-common-comment-start-after-first-star for indenting
block comments. See c-ts-mode--indent-styles for example.
For indenting statements:
- Set c-ts-common-indent-offset, and
c-ts-common-indent-type-regexp-alist, then use simple-indent
offset c-ts-common-statement-offset in
treesit-simple-indent-rules.
Defined variables (3)
c-ts-common--comment-regexp | Regexp pattern that matches a comment in C-like languages. |
c-ts-common-indent-offset | Indent offset used by ‘c-ts-common’ indent functions. |
c-ts-common-indent-type-regexp-alist | An alist of node type regexps. |
Defined functions (10)
c-ts-common--fill-block-comment | (&optional ARG) |
c-ts-common--fill-paragraph | (&optional ARG) |
c-ts-common--node-is | (NODE &rest TYPES) |
c-ts-common-comment-2nd-line-anchor | (N P BOL &rest _) |
c-ts-common-comment-2nd-line-matcher | (N PARENT &rest _) |
c-ts-common-comment-indent-new-line | (&optional SOFT) |
c-ts-common-comment-setup | () |
c-ts-common-comment-start-after-first-star | (N PARENT &rest _) |
c-ts-common-looking-at-star | (N P BOL &rest _) |
c-ts-common-statement-offset | (NODE PARENT &rest _) |