summaryrefslogtreecommitdiff
path: root/ale_linters/scala/fsc.vim
blob: fbdce20ecaa1ad7020609313b705fbca04b80afc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
" Author: Nils Leuzinger - https://github.com/PawkyPenguin
" Description: Basic scala support using fsc

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

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