forked from github-mirrors/ale
add options variable to isort
This commit is contained in:
parent
9ddf1b6a05
commit
3251d95a91
|
@ -5,6 +5,8 @@ call ale#Set('python_isort_executable', 'isort')
|
|||
call ale#Set('python_isort_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
|
||||
function! ale#fixers#isort#Fix(buffer) abort
|
||||
let l:options = ale#Var(a:buffer, 'python_isort_options')
|
||||
|
||||
let l:executable = ale#python#FindExecutable(
|
||||
\ a:buffer,
|
||||
\ 'python_isort',
|
||||
|
@ -17,6 +19,6 @@ function! ale#fixers#isort#Fix(buffer) abort
|
|||
|
||||
return {
|
||||
\ 'command': ale#path#BufferCdString(a:buffer)
|
||||
\ . ale#Escape(l:executable) . ' -',
|
||||
\ . ale#Escape(l:executable) . ' ' . l:options . ' -',
|
||||
\}
|
||||
endfunction
|
||||
|
|
|
@ -145,6 +145,14 @@ g:ale_python_isort_executable *g:ale_python_isort_executable*
|
|||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
g:ale_python_isort_options *g:ale_python_isort_options*
|
||||
*b:ale_python_isort_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass extra options to isort.
|
||||
|
||||
|
||||
g:ale_python_isort_use_global *g:ale_python_isort_use_global*
|
||||
*b:ale_python_isort_use_global*
|
||||
Type: |Number|
|
||||
|
|
Loading…
Reference in New Issue