summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/fix.vim4
-rw-r--r--autoload/ale/fixers/generic.vim4
-rw-r--r--autoload/ale/fixers/generic_python.vim4
-rw-r--r--autoload/ale/fixers/help.vim2
-rw-r--r--autoload/ale/fixers/standard.vim2
5 files changed, 9 insertions, 7 deletions
diff --git a/autoload/ale/fix.vim b/autoload/ale/fix.vim
index 03652ecf..423e85be 100644
--- a/autoload/ale/fix.vim
+++ b/autoload/ale/fix.vim
@@ -315,10 +315,10 @@ function! s:RunFixer(options) abort
\ ? call(l:Function, [l:buffer, a:options.output])
\ : call(l:Function, [l:buffer, a:options.output, copy(l:input)])
else
- " Chained commands accept (buffer, [input])
+ " Chained commands accept (buffer, [done, input])
let l:result = ale#util#FunctionArgCount(l:Function) == 1
\ ? call(l:Function, [l:buffer])
- \ : call(l:Function, [l:buffer, copy(l:input)])
+ \ : call(l:Function, [l:buffer, v:null, copy(l:input)])
endif
if type(l:result) is v:t_number && l:result == 0
diff --git a/autoload/ale/fixers/generic.vim b/autoload/ale/fixers/generic.vim
index cb8865b4..1d88553e 100644
--- a/autoload/ale/fixers/generic.vim
+++ b/autoload/ale/fixers/generic.vim
@@ -1,7 +1,7 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: Generic functions for fixing files with.
-function! ale#fixers#generic#RemoveTrailingBlankLines(buffer, lines) abort
+function! ale#fixers#generic#RemoveTrailingBlankLines(buffer, done, lines) abort
let l:end_index = len(a:lines) - 1
while l:end_index > 0 && empty(a:lines[l:end_index])
@@ -12,7 +12,7 @@ function! ale#fixers#generic#RemoveTrailingBlankLines(buffer, lines) abort
endfunction
" Remove all whitespaces at the end of lines
-function! ale#fixers#generic#TrimWhitespace(buffer, lines) abort
+function! ale#fixers#generic#TrimWhitespace(buffer, done, lines) abort
let l:index = 0
let l:lines_new = range(len(a:lines))
diff --git a/autoload/ale/fixers/generic_python.vim b/autoload/ale/fixers/generic_python.vim
index d55a23c3..9a929b96 100644
--- a/autoload/ale/fixers/generic_python.vim
+++ b/autoload/ale/fixers/generic_python.vim
@@ -2,7 +2,7 @@
" Description: Generic fixer functions for Python.
" Add blank lines before control statements.
-function! ale#fixers#generic_python#AddLinesBeforeControlStatements(buffer, lines) abort
+function! ale#fixers#generic_python#AddLinesBeforeControlStatements(buffer, done, lines) abort
let l:new_lines = []
let l:last_indent_size = 0
let l:last_line_is_blank = 0
@@ -41,7 +41,7 @@ endfunction
" This function breaks up long lines so that autopep8 or other tools can
" fix the badly-indented code which is produced as a result.
-function! ale#fixers#generic_python#BreakUpLongLines(buffer, lines) abort
+function! ale#fixers#generic_python#BreakUpLongLines(buffer, done, lines) abort
" Default to a maximum line length of 79
let l:max_line_length = 79
let l:conf = ale#path#FindNearestFile(a:buffer, 'setup.cfg')
diff --git a/autoload/ale/fixers/help.vim b/autoload/ale/fixers/help.vim
index b20740fe..9fb0717b 100644
--- a/autoload/ale/fixers/help.vim
+++ b/autoload/ale/fixers/help.vim
@@ -1,7 +1,7 @@
" Author: w0rp <devw0rp@gmail.com>
" Description: Generic fixer functions for Vim help documents.
-function! ale#fixers#help#AlignTags(buffer, lines) abort
+function! ale#fixers#help#AlignTags(buffer, done, lines) abort
let l:new_lines = []
for l:line in a:lines
diff --git a/autoload/ale/fixers/standard.vim b/autoload/ale/fixers/standard.vim
index 2b1f6f92..77712d40 100644
--- a/autoload/ale/fixers/standard.vim
+++ b/autoload/ale/fixers/standard.vim
@@ -14,9 +14,11 @@ endfunction
function! ale#fixers#standard#Fix(buffer) abort
let l:executable = ale#fixers#standard#GetExecutable(a:buffer)
+ let l:options = ale#Var(a:buffer, 'javascript_standard_options')
return {
\ 'command': ale#node#Executable(a:buffer, l:executable)
+ \ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' --fix %t',
\ 'read_temporary_file': 1,
\}