diff --git a/autoload/clang_format.vim b/autoload/clang_format.vim index f4ff380..2995c54 100644 --- a/autoload/clang_format.vim +++ b/autoload/clang_format.vim @@ -75,9 +75,11 @@ endfunction function! s:make_style_options() abort let extra_options = s:build_extra_options() - return printf("{BasedOnStyle: %s, IndentWidth: %d, UseTab: %s%s}", + let indentwidth = exists('*shiftwidth') ? shiftwidth() : &l:shiftwidth + return printf("{BasedOnStyle: %s, IndentWidth: %d, ContinuationIndentWidth: %d, UseTab: %s%s}", \ g:clang_format#code_style, - \ (exists('*shiftwidth') ? shiftwidth() : &l:shiftwidth), + \ indentwidth, + \ indentwidth * 2, \ &l:expandtab==1 ? 'false' : 'true', \ extra_options) endfunction