summaryrefslogtreecommitdiff
path: root/ale_linters/tex/lacheck.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/tex/lacheck.vim')
-rw-r--r--ale_linters/tex/lacheck.vim13
1 files changed, 10 insertions, 3 deletions
diff --git a/ale_linters/tex/lacheck.vim b/ale_linters/tex/lacheck.vim
index ffa1daa7..848cbed2 100644
--- a/ale_linters/tex/lacheck.vim
+++ b/ale_linters/tex/lacheck.vim
@@ -4,6 +4,14 @@
let g:ale_tex_lacheck_executable =
\ get(g:, 'ale_tex_lacheck_executable', 'lacheck')
+function! ale_linters#tex#lacheck#GetExecutable(buffer) abort
+ return g:ale_tex_lacheck_executable
+endfunction
+
+function! ale_linters#tex#lacheck#GetCommand(buffer) abort
+ return g:ale_tex_lacheck_executable . ' %t'
+endfunction
+
function! ale_linters#tex#lacheck#Handle(buffer, lines) abort
" Mattes lines like:
"
@@ -43,8 +51,7 @@ endfunction
call ale#linter#Define('tex', {
\ 'name': 'lacheck',
-\ 'executable': 'lacheck',
-\ 'command': g:ale#util#stdin_wrapper . ' .tex '
-\ . g:ale_tex_lacheck_executable,
+\ 'executable_callback': 'ale_linters#tex#lacheck#GetExecutable',
+\ 'command_callback': 'ale_linters#tex#lacheck#GetCommand',
\ 'callback': 'ale_linters#tex#lacheck#Handle'
\})