2018-04-05 19:04:11 +00:00
|
|
|
" Author: Nils Leuzinger - https://github.com/PawkyPenguin
|
|
|
|
" Description: Basic scala support using fsc
|
|
|
|
|
2018-08-02 22:44:12 +00:00
|
|
|
function! s:IsSbt(buffer) abort
|
|
|
|
return index(split(getbufvar(a:buffer, '&filetype'), '\.'), 'sbt') >= 0
|
2018-04-05 19:04:11 +00:00
|
|
|
endfunction
|
|
|
|
|
|
|
|
call ale#linter#Define('scala', {
|
|
|
|
\ 'name': 'fsc',
|
2018-08-02 22:44:12 +00:00
|
|
|
\ 'executable_callback': {buf -> s:IsSbt(buf) ? '' : 'fsc'},
|
|
|
|
\ 'command': '%e -Ystop-after:parser %t',
|
2018-04-05 19:04:11 +00:00
|
|
|
\ 'callback': 'ale#handlers#scala#HandleScalacLintFormat',
|
|
|
|
\ 'output_stream': 'stderr',
|
|
|
|
\})
|