铿锵格式是什么:
QObject::connect(&w, &sap::Window::keyPress, [&w](auto* event)
{
if(event->key() == Qt::Key_Escape)
w.close();
});
我想要的是:
QObject::connect(&w, &sap::Window::keyPress, [&w](auto* event)
{
if(event->key() == Qt::Key_Escape)
w.close();
});
有没有办法可以使 clang 格式不缩进 lambda 主体?在文档中找不到任何关于它的信息。
这是我到目前为止所拥有的:
BasedOnStyle: LLVM,
BreakBeforeBraces: Allman,
NamespaceIndentation: All,
SpaceBeforeParens: Never,
AccessModifierOffset: -4,
AllowShortIfStatementsOnASingleLine: false,
AllowShortBlocksOnASingleLine: false,
AllowShortFunctionsOnASingleLine: None,
AllowShortCaseLabelsOnASingleLine: false,
AllowShortLoopsOnASingleLine: false,
ColumnLimit: 100,
AlwaysBreakTemplateDeclarations: true,
PenaltyReturnTypeOnItsOwnLine: 9999,
IndentWidth: 4,
PointerAlignment: Left