summaryrefslogtreecommitdiff
path: root/doc/lispref/parsing.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref/parsing.texi')
-rw-r--r--doc/lispref/parsing.texi14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi
index feb92345ff4..6a23b0feb33 100644
--- a/doc/lispref/parsing.texi
+++ b/doc/lispref/parsing.texi
@@ -1731,6 +1731,20 @@ For more information of these built-in tree-sitter features,
For supporting mixing of multiple languages in a major mode,
@pxref{Multiple Languages}.
+Setting the following local variables allows tree-sitter's indentation
+engine to correctly indent multi-line comments:
+
+@defvar treesit-comment-start
+This should be a regular expression matching an opening comment token.
+For example, it should match @samp{//}, @samp{////}, @samp{/*},
+@samp{/****}, etc., in C.
+@end defvar
+
+@defvar treesit-comment-end
+This should be a regular expression matching an closing comment token.
+For example, it should match @samp{*/}, @samp{****/}, etc., in C.
+@end defvar
+
@node Tree-sitter C API
@section Tree-sitter C API Correspondence