You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it currently exists, the SeparateDefinitionBlocks option only allows for no spacing (SDS_Never), or exactly one space (SDS_Always). The amount of space should be configurable, especially as some organizations require two spaces between blocks as part of their formatting style.
In the ideal case, an option such as DefinitionBlockSpacing would be added to allow users to set a custom amount of space between definition blocks. For example,
Fixesllvm#57180
Given configuration:
```
SeparateDefinitionBlocks: Always
DefinitionBlockSpacing: 2
```
Two spaces will be inserted between definition blocks. Code before
formatting:
```
/// f is a function
void f() {
// Some code
// More code
return;
}
/// g is another function
void g() {
// Some other code
}
```
Versus code after formatting:
```
/// f is a function
void f() {
// Some code
// More code
return;
}
/// g is another function
void g() {
// Some other code
}
```
Note: two zero width spaces were inserted into the commit message in
order to prevent git from removing the additional lines inside the
commit. These will not appear in formatted code.
As it currently exists, the
SeparateDefinitionBlocks
option only allows for no spacing (SDS_Never), or exactly one space (SDS_Always). The amount of space should be configurable, especially as some organizations require two spaces between blocks as part of their formatting style.In the ideal case, an option such as
DefinitionBlockSpacing
would be added to allow users to set a custom amount of space between definition blocks. For example,Would result in two lines being used to separate definition blocks.
The text was updated successfully, but these errors were encountered: