diff options
Diffstat (limited to 'ale_linters/lua/luacheck.vim')
-rw-r--r-- | ale_linters/lua/luacheck.vim | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ale_linters/lua/luacheck.vim b/ale_linters/lua/luacheck.vim index e208c93b..ab590911 100644 --- a/ale_linters/lua/luacheck.vim +++ b/ale_linters/lua/luacheck.vim @@ -4,6 +4,15 @@ let g:ale_lua_luacheck_executable = \ get(g:, 'ale_lua_luacheck_executable', 'luacheck') +function! ale_linters#lua#luacheck#GetExecutable(buffer) abort + return g:ale_lua_luacheck_executable +endfunction + +function! ale_linters#lua#luacheck#GetCommand(buffer) abort + return ale_linters#lua#luacheck#GetExecutable(a:buffer) + \ . ' --formatter plain --codes --filename %s -' +endfunction + function! ale_linters#lua#luacheck#Handle(buffer, lines) abort " Matches patterns line the following: " @@ -33,7 +42,7 @@ endfunction call ale#linter#Define('lua', { \ 'name': 'luacheck', -\ 'executable': g:ale_lua_luacheck_executable, -\ 'command': g:ale_lua_luacheck_executable . ' --formatter plain --codes --filename %s -', +\ 'executable_callback': 'ale_linters#lua#luacheck#GetExecutable', +\ 'command_callback': 'ale_linters#lua#luacheck#GetCommand', \ 'callback': 'ale_linters#lua#luacheck#Handle', \}) |