Update clang format

This commit is contained in:
doyle 2020-11-10 11:25:33 +11:00
parent e563191204
commit 886a8d30d8

View File

@ -212,8 +212,43 @@ noremap <C-F> :<C-U><C-R>=printf("Leaderf! rg -e %s ", expand("<cword>"))<CR>
" ============================================================================== " ==============================================================================
" Clang Format " Clang Format
" ============================================================================== " ==============================================================================
map <C-I> :ClangFormat<CR> let g:clang_format#style_options = {
imap <C-I> <ESC>:ClangFormat<CR>i \ "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 <C-I> <C-v>:ClangFormat<CR>
" ============================================================================== " ==============================================================================
" Compiling / AsyncRun " Compiling / AsyncRun