summaryrefslogtreecommitdiff
path: root/ale_linters/lua/luac.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/lua/luac.vim')
-rw-r--r--ale_linters/lua/luac.vim13
1 files changed, 2 insertions, 11 deletions
diff --git a/ale_linters/lua/luac.vim b/ale_linters/lua/luac.vim
index 4a6bb403..bca2cd8d 100644
--- a/ale_linters/lua/luac.vim
+++ b/ale_linters/lua/luac.vim
@@ -3,15 +3,6 @@
call ale#Set('lua_luac_executable', 'luac')
-function! ale_linters#lua#luac#GetExecutable(buffer) abort
- return ale#Var(a:buffer, 'lua_luac_executable')
-endfunction
-
-function! ale_linters#lua#luac#GetCommand(buffer) abort
- let l:executable = ale_linters#lua#luac#GetExecutable(a:buffer)
- return ale#Escape(l:executable) . ' -p - '
-endfunction
-
function! ale_linters#lua#luac#Handle(buffer, lines) abort
" Matches patterns line the following:
"
@@ -33,8 +24,8 @@ endfunction
call ale#linter#Define('lua', {
\ 'name': 'luac',
-\ 'executable_callback': 'ale_linters#lua#luac#GetExecutable',
-\ 'command_callback': 'ale_linters#lua#luac#GetCommand',
+\ 'executable_callback': ale#VarFunc('lua_luac_executable'),
+\ 'command': '%e -p -',
\ 'output_stream': 'stderr',
\ 'callback': 'ale_linters#lua#luac#Handle',
\})