2018-03-31 10:55:20 -04:00
|
|
|
" Author: Zoltan Kalmar - https://github.com/kalmiz,
|
|
|
|
" w0rp <devw0rp@gmail.com>
|
|
|
|
" Description: Basic scala support using scalac
|
|
|
|
|
2018-08-25 12:13:42 -04:00
|
|
|
function! s:IsSbt(buffer) abort
|
|
|
|
return index(split(getbufvar(a:buffer, '&filetype'), '\.'), 'sbt') >= 0
|
2018-03-31 10:55:20 -04:00
|
|
|
endfunction
|
|
|
|
|
|
|
|
call ale#linter#Define('scala', {
|
|
|
|
\ 'name': 'scalac',
|
2019-03-08 06:04:56 -05:00
|
|
|
\ 'executable': {buf -> s:IsSbt(buf) ? '' : 'scalac'},
|
2018-08-25 12:13:42 -04:00
|
|
|
\ 'command': '%e -Ystop-after:parser %t',
|
2018-06-14 06:31:12 -04:00
|
|
|
\ 'callback': 'ale#handlers#scala#HandleScalacLintFormat',
|
2018-03-31 10:55:20 -04:00
|
|
|
\ 'output_stream': 'stderr',
|
|
|
|
\})
|