summaryrefslogtreecommitdiff
path: root/ale_linters/scala/scalac.vim
blob: 3dbdd9253e3a71fd320e23bd8519888a40fdfccb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
" Author: Zoltan Kalmar - https://github.com/kalmiz,
"         w0rp <devw0rp@gmail.com>
" Description: Basic scala support using scalac

function! s:IsSbt(buffer) abort
    return index(split(getbufvar(a:buffer, '&filetype'), '\.'), 'sbt') >= 0
endfunction

call ale#linter#Define('scala', {
\   'name': 'scalac',
\   'executable_callback': {buf -> s:IsSbt(buf) ? '' : 'scalac'},
\   'command': '%e -Ystop-after:parser %t',
\   'callback': 'ale#handlers#scala#HandleScalacLintFormat',
\   'output_stream': 'stderr',
\})