summaryrefslogtreecommitdiffstats
path: root/compiler/sbt.vim
blob: e5aa4d147bd28b0460bff81c97b8bee94739780a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'scala') != -1
  finish
endif

" Vim compiler file
" Language:             Scala SBT (http://www.scala-sbt.org/)
" Maintainer:           Derek Wyatt
" URL:                  https://github.com/derekwyatt/vim-scala
" License:              Apache 2
" ----------------------------------------------------------------------------

if exists('current_compiler')
  finish
endif
let current_compiler = 'sbt'

if exists(':CompilerSet') != 2          " older Vim always used :setlocal
  command -nargs=* CompilerSet setlocal <args>
endif

let s:cpo_save = &cpo
set cpo-=C

CompilerSet makeprg=sbt\ -Dsbt.log.noformat=true\ compile

CompilerSet errorformat=
      \%E\ %#[error]\ %f:%l:%c:\ %m,%C\ %#[error]\ %p^,%-C%.%#,%Z,
      \%W\ %#[warn]\ %f:%l:%c:\ %m,%C\ %#[warn]\ %p^,%-C%.%#,%Z,
      \%-G%.%#

let &cpo = s:cpo_save
unlet s:cpo_save

" vim:set sw=2 sts=2 ts=8 et: