summaryrefslogtreecommitdiff
path: root/ale_linters/coffee/coffee.vim
blob: f2539281150930d5f18f5c35a876d2b4cac8a5bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
" Author: KabbAmine - https://github.com/KabbAmine
" Description: Coffee for checking coffee files

function! ale_linters#coffee#coffee#GetExecutable(buffer) abort
    return ale#path#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', {
\   'name': 'coffee',
\   'executable_callback': 'ale_linters#coffee#coffee#GetExecutable',
\   'command_callback': 'ale_linters#coffee#coffee#GetCommand',
\   'output_stream': 'stderr',
\   'callback': 'ale#handlers#gcc#HandleGCCFormat',
\})