llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Make Definition Block Spacing Configurable

Open codeinred opened this issue 2 years ago • 2 comments

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,

SeparateDefinitionBlocks: Always
DefinitionBlockSpacing: 2

Would result in two lines being used to separate definition blocks.

codeinred avatar Aug 16 '22 19:08 codeinred

@llvm/issue-subscribers-clang-format

llvmbot avatar Aug 16 '22 21:08 llvmbot

Update: I've implemented this feature here. I'll be submitting this patch for review.

codeinred avatar Aug 17 '22 05:08 codeinred

Update: Patch submitted for review: https://reviews.llvm.org/D132256

codeinred avatar Aug 19 '22 18:08 codeinred