install: add a global .clang-format

This commit is contained in:
Fernando Schauenburg 2024-08-23 21:21:17 +02:00
parent 66b9cfd1f0
commit 3d7b013393
2 changed files with 29 additions and 0 deletions

28
home/clang-format Normal file
View file

@ -0,0 +1,28 @@
BasedOnStyle: Google
AccessModifierOffset: -4
AlignArrayOfStructures: Right
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: true
AlignConsecutiveMacros: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: WebKit
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
ContinuationIndentWidth: 8
DerivePointerAlignment: false
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 4
PPIndentWidth: 2
PackConstructorInitializers: CurrentLine
PointerAlignment: Right
ReferenceAlignment: Pointer
SeparateDefinitionBlocks: Always
SortUsingDeclarations: true
SpaceAfterTemplateKeyword: false

View file

@ -137,6 +137,7 @@ execute() {
heading 'create links'
make_link "$DESTDIR/.XCompose" "$dotfiles/home/XCompose"
make_link "$DESTDIR/.bin" "$dotfiles/bin"
make_link "$DESTDIR/.clang-format" "$dotfiles/home/clang-format"
make_link "$DESTDIR/.config" "$dotfiles/config"
make_link "$DESTDIR/.editorconfig" "$dotfiles/home/editorconfig"
make_link "$DESTDIR/.hushlogin" "$dotfiles/home/hushlogin"