Remove more uses of command_callback and executable_callback
This commit is contained in:
parent
c6a6a37931
commit
8a0213f1fd
@ -1,3 +1,4 @@
|
||||
scriptencoding utf-8
|
||||
" Author: Johannes Wienke <languitar@semipol.de>
|
||||
" Description: Error handling for errors in alex output format
|
||||
|
||||
@ -44,8 +45,8 @@ function! ale#handlers#alex#DefineLinter(filetype, flags) abort
|
||||
|
||||
call ale#linter#Define(a:filetype, {
|
||||
\ 'name': 'alex',
|
||||
\ 'executable_callback': 'ale#handlers#alex#GetExecutable',
|
||||
\ 'command_callback': ale#handlers#alex#CreateCommandCallback(a:flags),
|
||||
\ 'executable': function('ale#handlers#alex#GetExecutable'),
|
||||
\ 'command': ale#handlers#alex#CreateCommandCallback(a:flags),
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'callback': 'ale#handlers#alex#Handle',
|
||||
\ 'lint_file': 1,
|
||||
|
@ -1,4 +1,4 @@
|
||||
" Author: Vincent (wahrwolf [ät] wolfpit.net)
|
||||
" Author: Vincent (wahrwolf [at] wolfpit.net)
|
||||
" Description: languagetool for markdown files
|
||||
"
|
||||
call ale#Set('languagetool_executable', 'languagetool')
|
||||
@ -65,8 +65,8 @@ endfunction
|
||||
function! ale#handlers#languagetool#DefineLinter(filetype) abort
|
||||
call ale#linter#Define(a:filetype, {
|
||||
\ 'name': 'languagetool',
|
||||
\ 'executable_callback': 'ale#handlers#languagetool#GetExecutable',
|
||||
\ 'command_callback': 'ale#handlers#languagetool#GetCommand',
|
||||
\ 'executable': function('ale#handlers#languagetool#GetExecutable'),
|
||||
\ 'command': function('ale#handlers#languagetool#GetCommand'),
|
||||
\ 'output_stream': 'stdout',
|
||||
\ 'callback': 'ale#handlers#languagetool#HandleOutput',
|
||||
\ 'lint_file': 1,
|
||||
|
@ -26,7 +26,6 @@ function! ale#handlers#sml#GetCmFile(buffer) abort
|
||||
endfunction
|
||||
|
||||
" Only one of smlnj or smlnj-cm can be enabled at a time.
|
||||
" executable_callback is called before *every* lint attempt
|
||||
function! s:GetExecutable(buffer, source) abort
|
||||
if ale#handlers#sml#GetCmFile(a:buffer) is# ''
|
||||
" No CM file found; only allow single-file mode to be enabled
|
||||
|
@ -65,8 +65,8 @@ function! ale#handlers#writegood#DefineLinter(filetype) abort
|
||||
call ale#linter#Define(a:filetype, {
|
||||
\ 'name': 'writegood',
|
||||
\ 'aliases': ['write-good'],
|
||||
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
|
||||
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
|
||||
\ 'executable': function('ale#handlers#writegood#GetExecutable'),
|
||||
\ 'command': function('ale#handlers#writegood#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#writegood#Handle',
|
||||
\})
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user