Skip to main content
11 events
when toggle format what by license comment
Oct 13 at 1:58 comment added NickD I'm not sure I understand what @Ian is driving at in his answer, but my take on tree-sitter support in Emacs can be found at this answer - although N.B. it does not answer your indentation question. But if the linked answer is indeed the way to use tree-sitter in Emacs, then the answer to your question is to customize treesit-simple-indent-rules (how to customize it is TBD: I have not gone through the exercise).
S Oct 12 at 11:29 history bounty ended user888379
S Oct 12 at 11:29 history notice removed user888379
Oct 7 at 12:23 vote accept user888379
Oct 7 at 11:48 comment added user888379 @NickD I don't think it's a naive question; I'm in the process of sorting it out myself. There's the confusing history of the external tree-sitter package (which I had been building with) vs the built-in treesit machinery, and how existing cc-mode settings are handled. I focused on the '<<' issue because that was an obvious place where c-ts-mode wasn't doing what I wanted.
Oct 7 at 3:09 comment added NickD How are you enabling tree-sitter mode in your C++ file? Are you doing the equivalent of M-x c++-ts-mode? That's a naive question: I don't know what the proper setup is and, given @Ian's answer (with multiple options given), I'm wondering how exactly you go about it.
Oct 6 at 12:07 answer added Ian timeline score: 1
S Oct 4 at 21:48 history bounty started user888379
S Oct 4 at 21:48 history notice added user888379 Draw attention
S Oct 2 at 19:25 review First questions
Oct 7 at 12:27
S Oct 2 at 19:25 history asked user888379 CC BY-SA 4.0