【发布时间】:2020-09-01 06:00:18
【问题描述】:
如果 clang-format 是 rustfmt,它将有这个包罗万象的 indent_style 配置选项,它指的是缩进样式的基本区别:
视觉(默认为 clang 格式):
ReturnType<std::vector<int>> ClassName::functionName(int a,
bool b,
float c,
double d,
long double complex e);
static const char* names[] = {"a",
"b",
"c"};
阻止(rustfmt 中的默认设置):
ReturnType<std::vector<int>> ClassName::functionName(
int a,
bool b,
float c,
double d,
long double complex e);
static const char* names[] = {
"a",
"b",
"c",
};
如何配置 clang-format 以在所有语法范围内进行块缩进?
或者是否有任何 C++ 格式化程序支持块缩进?
【问题讨论】:
标签: c++ code-formatting clang-format