News for hackers. Stuff that matters.
Re:Maintain consistent styles for developers working across ... by 3836293648 on Sunday April 23, 2023 @08:31PM (#35682270)
(EDIT: Newlines in the code example)

Oooh, that's much closer. Not perfect, but so much better. Do you have a solution for this as well?

    →(StructType){
    →····.a = 1,
    →····.b = 2,
    →};
It's not just this scenario, but this is the worst one. It does it regardless of useTab and what's worse is that it's four spaces when both indent width and tab size are set to 8
Re:Maintain consistent styles for developers working across ... by kps on Sunday April 23, 2023 @09:35PM (#35682713)
Weirdly, initializer indentation is controlled by `ContinuationIndentWidth` rather than by `IndentWidth`. That one I would agree is a clang-format bug, or a mistaken policy decision.

I haven't myself worked on a tabbed code base during clang-format's existence. You might want to look at Linux's settings for ideas, although they clearly differ from your preferences in other ways. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...