mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-26 02:08:44 +08:00
add options variable to isort
This commit is contained in:
@@ -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))
|
call ale#Set('python_isort_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||||
|
|
||||||
function! ale#fixers#isort#Fix(buffer) abort
|
function! ale#fixers#isort#Fix(buffer) abort
|
||||||
|
let l:options = ale#Var(a:buffer, 'python_isort_options')
|
||||||
|
|
||||||
let l:executable = ale#python#FindExecutable(
|
let l:executable = ale#python#FindExecutable(
|
||||||
\ a:buffer,
|
\ a:buffer,
|
||||||
\ 'python_isort',
|
\ 'python_isort',
|
||||||
@@ -17,6 +19,6 @@ function! ale#fixers#isort#Fix(buffer) abort
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
\ 'command': ale#path#BufferCdString(a:buffer)
|
\ 'command': ale#path#BufferCdString(a:buffer)
|
||||||
\ . ale#Escape(l:executable) . ' -',
|
\ . ale#Escape(l:executable) . ' ' . l:options . ' -',
|
||||||
\}
|
\}
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -145,6 +145,14 @@ g:ale_python_isort_executable *g:ale_python_isort_executable*
|
|||||||
See |ale-integrations-local-executables|
|
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*
|
g:ale_python_isort_use_global *g:ale_python_isort_use_global*
|
||||||
*b:ale_python_isort_use_global*
|
*b:ale_python_isort_use_global*
|
||||||
Type: |Number|
|
Type: |Number|
|
||||||
|
|||||||
Reference in New Issue
Block a user