bug#68493: Got to be a better way to customize c-ts-mode indentation
Tomas Nordin <[email protected]> Mon, 03 Aug 2026 12:45:48 +0000
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
Eli Zaretskii <[email protected]> writes: >> From: Daniel Colascione <[email protected]> >> Date: Mon, 15 Jan 2024 18:51:25 -0500 >> >> There's got to be a way to customize tree-sitter-based indentation >> that's cleaner than the patching I'm doing below. > > Agreed. Patches welcome. > >> Wouldn't it be nice if we could use cc-mode indentation rules with >> c-ts-mode? > > It would, indeed. Of course, it isn't easy: CC Mode's indentation > rules are defined in terms of pseudo-syntactic parameters that don't > map easily (to say the least) into what a parser returns, and many of > the rules invoke CC Mode functions (as opposed to reference variables > and literals) that are specific to CC Mode and its analysis of the C > source. Again, patches welcome. Is the following description this bug? Or should I talk more about it in some other or new report? Its about indentation of concatanated strings like this (in a c-buffer) char *lines = "line1\n" "line2\n" The above is what I "get" with c-mode (in emacs -Q). If I switch over to c-ts-mode and say C-x h and TAB, I get char *lines = "line1\n" "line2\n" Further literals will align with "line2\n". I would like it to be aligned as with c-mode. Is there a setting for this? This has been observed with GNU Emacs 31.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.4) of 2026-07-02