From 850046bc08528f49712c5b06e84e64d2824aae92 Mon Sep 17 00:00:00 2001 From: Guy John Date: Thu, 3 Jan 2013 12:24:02 +0000 Subject: [PATCH] Use scala compiler instead of interpreter Using the scala compiler instead of the interpreter to check the syntax means that an error will not be raised if there is a package decleration. Also, stopping the compiler after the parser stage stops errors being raised when importing from other files in your project. --- syntax_checkers/scala.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax_checkers/scala.vim b/syntax_checkers/scala.vim index 3332dda9..2013bbd3 100644 --- a/syntax_checkers/scala.vim +++ b/syntax_checkers/scala.vim @@ -11,7 +11,7 @@ "============================================================================ "bail if the user doesnt have the scala binary installed -if !executable("scala") +if !executable("scalac") finish endif @@ -20,7 +20,7 @@ if !exists("g:syntastic_scala_options") endif function! SyntaxCheckers_scala_GetLocList() - let makeprg = 'scala '. g:syntastic_scala_options .' '. shellescape(expand('%')) . ' /dev/null' + let makeprg = 'scalac -Ystop-after:parser '. g:syntastic_scala_options .' '. shellescape(expand('%')) let errorformat = '%f\:%l: %trror: %m'