fixup! defaults/yapf: handle yapf config file

This commit is contained in:
Manuel Mendez 2017-07-27 10:51:23 -04:00
parent 989aa62e94
commit e80935baff

View File

@ -43,7 +43,7 @@ if !exists('g:formatter_yapf_style')
endif endif
if !exists('g:formatdef_yapf') if !exists('g:formatdef_yapf')
let s:configfile_def = "'yapf -l '.a:firstline.'-'.a:lastline" let s:configfile_def = "'yapf -l '.a:firstline.'-'.a:lastline"
let s:noconfigfile_def = "'yapf --style=\"{based_on_style:'.g:formatter_yapf_style.',indent_width:'.&shiftwidth.'}\" -l '.a:firstline.'-'.a:lastline" let s:noconfigfile_def = "'yapf --style=\"{based_on_style:'.g:formatter_yapf_style.',indent_width:'.&shiftwidth.(&textwidth ? ',column_limit:'.&textwidth : '').'}\" -l '.a:firstline.'-'.a:lastline"
let g:formatdef_yapf = "g:YAPFFormatConfigFileExists() ? (" . s:configfile_def . ") : (" . s:noconfigfile_def . ")" let g:formatdef_yapf = "g:YAPFFormatConfigFileExists() ? (" . s:configfile_def . ") : (" . s:noconfigfile_def . ")"
endif endif