Support custom line lengths with yapf Python formatter.
The 'column-width' option was added to the default yapf command. The value is set to match the 'textwidth' value of the current buffer.
This commit is contained in:
parent
1ad6f8eea7
commit
5c957257e0
@ -42,7 +42,7 @@ if !exists('g:formatter_yapf_style')
|
|||||||
let g:formatter_yapf_style = 'pep8'
|
let g:formatter_yapf_style = 'pep8'
|
||||||
endif
|
endif
|
||||||
if !exists('g:formatdef_yapf')
|
if !exists('g:formatdef_yapf')
|
||||||
let g:formatdef_yapf = "'yapf --style=\"{based_on_style:'.g:formatter_yapf_style.',indent_width:'.&shiftwidth.'}\" -l '.a:firstline.'-'.a:lastline"
|
let g:formatdef_yapf = "'yapf --style=\"{based_on_style:'.g:formatter_yapf_style.',indent_width:'.&shiftwidth.',column_limit:'.&textwidth.'}\" -l '.a:firstline.'-'.a:lastline"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('g:formatters_python')
|
if !exists('g:formatters_python')
|
||||||
|
Loading…
Reference in New Issue
Block a user