clang-format removes new lines in array definition with designators

前端 未结 2 2051
一个人的身影
一个人的身影 2021-01-22 11:48

I like to define my array values with a designator, when possible:

enum Mode {
    NONE,
    SPLIT_FILES,
    SINGLE_FILE,
    INVALID
};

const std::string Mode         


        
2条回答
  •  温柔的废话
    2021-01-22 12:21

    This answer gave me an acceptable work-around:

    Set ColumnLimit to 0. The trade-off is that no line is automatically wrapped, but this is worth it. All programmers at work tend to not write past column 120 anyway.

提交回复
热议问题