From 886a8d30d864841c09a12096b1fee20705860e78 Mon Sep 17 00:00:00 2001 From: doyle Date: Tue, 10 Nov 2020 11:25:33 +1100 Subject: [PATCH] Update clang format --- Installer/_vimrc | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/Installer/_vimrc b/Installer/_vimrc index bce83b4..7acb938 100644 --- a/Installer/_vimrc +++ b/Installer/_vimrc @@ -212,8 +212,43 @@ noremap :=printf("Leaderf! rg -e %s ", expand("")) " ============================================================================== " Clang Format " ============================================================================== -map :ClangFormat -imap :ClangFormati +let g:clang_format#style_options = { + \ "AccessModifierOffset": -4, + \ "AlignAfterOpenBracket": "true", + \ "AlignConsecutiveAssignments": "true", + \ "AlignTrailingComments": "true", + \ "AllowAllParametersOfDeclarationOnNextLine": "true", + \ "AllowShortBlocksOnASingleLine": "false", + \ "AllowShortIfStatementsOnASingleLine": "true", + \ "AllowShortLoopsOnASingleLine": "false", + \ "AlwaysBreakAfterDefinitionReturnType": "false", + \ "AlwaysBreakBeforeMultilineStrings": "true", + \ "AlwaysBreakTemplateDeclarations": "true", + \ "BinPackArguments": "false", + \ "BinPackParameters": "false", + \ "BreakBeforeBraces": "Allman", + \ "BreakConstructorInitializersBeforeComma": "true", + \ "ColumnLimit": 120, + \ "ConstructorInitializerIndentWidth": 0, + \ "Cpp11BracedListStyle": "true", + \ "IndentCaseLabels": "true", + \ "IndentFunctionDeclarationAfterType": "false", + \ "IndentWidth": 4, + \ "MaxEmptyLinesToKeep": 1, + \ "NamespaceIndentation": "None", + \ "PointerBindsToType": "false", + \ "SpaceBeforeAssignmentOperators": "true", + \ "SpaceInEmptyParentheses": "false", + \ "SpacesBeforeTrailingComments": 1, + \ "SpacesInAngles": "false", + \ "SpacesInCStyleCastParentheses": "false", + \ "SpacesInParentheses": "false", + \ "SpacesInSquareBrackets": "false", + \ "Standard": "Cpp11", + \ "TabWidth": 4, + \ } + +map :ClangFormat " ============================================================================== " Compiling / AsyncRun