I'm running emacs 30.2 (built locally from source), on Ubuntu, using doom. Today, I was editing some c++ code that uses iostreams, and I had multiple lines that started with the '<<' operator. My preferred indentation style looks like:
std::cout << "here's some text" << " and some more text\n"; What tree-sitter prefers is:
std::cout << "here's some text" << " and some more text\n"; I've been looking around for information about configuring tree-sitter modes, and have found it to be somewhat impenetrable. Before I go completely down the rabbit-hole, I thought I'd ask here to see if this is a solved problem.
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.tree-sittersupport 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 usetree-sitterin Emacs, then the answer to your question is to customizetreesit-simple-indent-rules(how to customize it is TBD: I have not gone through the exercise).