add support for locally installed coffee

This commit is contained in:
Ethan Chan 2017-02-02 17:03:26 -08:00
parent 1da187a6e5
commit 69ce8502a4
1 changed files with 15 additions and 2 deletions

View File

@ -1,10 +1,23 @@
" Author: KabbAmine - https://github.com/KabbAmine " Author: KabbAmine - https://github.com/KabbAmine
" Description: Coffee for checking coffee files " Description: Coffee for checking coffee files
function! ale_linters#coffee#coffee#GetExecutable(buffer) abort
return ale#util#ResolveLocalPath(
\ a:buffer,
\ 'node_modules/.bin/coffee',
\ 'coffee'
\)
endfunction
function! ale_linters#coffee#coffee#GetCommand(buffer) abort
return ale_linters#coffee#coffee#GetExecutable(a:buffer)
\ . ' -cp -s'
endfunction
call ale#linter#Define('coffee', { call ale#linter#Define('coffee', {
\ 'name': 'coffee', \ 'name': 'coffee',
\ 'executable': 'coffee', \ 'executable_callback': 'ale_linters#coffee#coffee#GetExecutable',
\ 'command': 'coffee -cp -s', \ 'command_callback': 'ale_linters#coffee#coffee#GetCommand',
\ 'output_stream': 'stderr', \ 'output_stream': 'stderr',
\ 'callback': 'ale#handlers#HandleGCCFormat', \ 'callback': 'ale#handlers#HandleGCCFormat',
\}) \})