summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-07-05 09:25:16 +0100
committerGitHub <noreply@github.com>2018-07-05 09:25:16 +0100
commitd49daeb816217014a50bdab9d61b22535e55b179 (patch)
treec6b05be09ee34aa6c99dd98c404d5b369551e170 /autoload
parent14025c725f4d94c6661071cfa85fc5c996e8b390 (diff)
parentb8591e1034abdccd3e9c960da20d5fa276fd90a0 (diff)
downloadale-d49daeb816217014a50bdab9d61b22535e55b179.zip
Merge pull request #1698 from dsifford/dsifford-isort-options
add options variable to isort
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fixers/isort.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/autoload/ale/fixers/isort.vim b/autoload/ale/fixers/isort.vim
index 74ba3bc8..9070fb27 100644
--- a/autoload/ale/fixers/isort.vim
+++ b/autoload/ale/fixers/isort.vim
@@ -2,9 +2,12 @@
" Description: Fixing Python imports with isort.
call ale#Set('python_isort_executable', 'isort')
+call ale#Set('python_isort_options', '')
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 +20,6 @@ function! ale#fixers#isort#Fix(buffer) abort
return {
\ 'command': ale#path#BufferCdString(a:buffer)
- \ . ale#Escape(l:executable) . ' -',
+ \ . ale#Escape(l:executable) . (!empty(l:options) ? ' ' . l:options : '') . ' -',
\}
endfunction