I have C++
code, and I want format it by Goole style
with two differences:
- Code ident: 4 spaces
- Column limit: 80
- Function parameters: normally idented block
- Function arguments: normally idented block
The form I want to get as follow:
SomeClass::SomeClass(
OraQuery *p_query,
ListView *p_list_view,
bool p_fetch_all) :
m_query(p_query),
m_list_view(p_list_view),
m_fetch_all(p_fetch_all) {
if (!m_fetch_all) {
// ...
someFunction(
a1,
a2,
a3);
}
// ...
}
I found suggestion, to set AlignAfterOpenBracket
to BlockIndent
, but it didn’t help.
The configuration I have now:
{
BasedOnStyle: Google,
IndentWidth: 4,
TabWidth: 4,
AlignAfterOpenBracket: BlockIndent,
ColumnLimit: 80
}