C++ clang格式:如何在访问修改器之后保留换行符?

C++ clang格式:如何在访问修改器之后保留换行符?,c++,clang-format,C++,Clang Format,我得到的是: class Foo { public: int stuff; int otherStuff; } 我想得到(或保留)的是: 如何防止在access修饰符缩进后删除行式提要?您的MaxEmptyLinesToKeep和KeepEmptyLinesAttheStartofBlock是什么?我不知道后者是否适用,但可能值得一试。似乎没有任何效果。也许根本不支持这一点。。 class Foo { public: int stuff; int otherStuff;

我得到的是:

class Foo
{
public:
  int stuff;

  int otherStuff;
}
我想得到(或保留)的是:


如何防止在access修饰符缩进后删除行式提要?

您的MaxEmptyLinesToKeep和KeepEmptyLinesAttheStartofBlock是什么?我不知道后者是否适用,但可能值得一试。似乎没有任何效果。也许根本不支持这一点。。
class Foo
{
public:

  int stuff;

  int otherStuff;
}