Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Scala lang plugin #181

Merged
merged 1 commit into from

9 participants

@rickeyski

Hi,

I wrote a scala language plugin for syntastic.

All the best,
~Rickey

@scrooloose scrooloose merged commit d09c330 into scrooloose:master
@devth

awesome, thanks @rickeyski

@vsviridov

Always complains about

package com.whatever.blah //illegal start of definition

because it's using the interpreter and not the compiler

@dreki

Second @vsviridov's complaint. Very annoying.

@vsviridov

Actually, I'm trying to write a plugin that would use sbt.
But I'm kinda new to both scala and vim script. So it's taking a while.

@spencerdeinum

I made an edit to the scala syntax checker on my machine, which i pushed here... spencerdeinum@7a9d955

I'm not really sure if this is worth pushing, that command line argument doesn't seem to be well documented.

Also I think it only works for 2.9, versions before that would use -Ystop instead of -Ystop-after.

@kul

:+1: for the patch.. @spencerdeinum why havent you send a pull request yet?

@spencerdeinum

I can make a pull request, my issue is that scalac doesn't seem to have a setting that only runs to check for errors.

The flag I used is, I think, non-standard so I'm not sure if it will break or not.

It's still not very good but it does work a bit better than the other setting, I'll submit a pull request later tonight if you guys still think its useful.

@rumblesan

hey all, I've actually just sent in a pull request for this since it's been bugging me. Didn't mean to pip you to the post @spencerdeinum :)

#436

After a bit of research, it seems that stopping the compilation after the parser stage is best, otherwise I was getting errors raised when using import statements from other files in my project.

@spencerdeinum

No worries, I'm glad you did the research and picked a better stopping stage! nice work.

@scrooloose
Owner

Hey guys, I have merged in @rumblesan's #436 patch. Report any problems back here :)

@ghost

Is there an update for Scala 2.10? I'm receiving an error with string interpolation?

@lcd047
Collaborator

@aidylewis Please open a new report. Explain what you did, what you expected to happen, and what happened instead. Show a test case if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 21, 2012
  1. scala language plugin

    Rickey authored
This page is out of date. Refresh to see the latest.
Showing with 33 additions and 0 deletions.
  1. +33 −0 syntax_checkers/scala.vim
View
33 syntax_checkers/scala.vim
@@ -0,0 +1,33 @@
+"============================================================================
+"File: scala.vim
+"Description: Syntax checking plugin for syntastic.vim
+"Maintainer: Rickey Visinski <rickeyvisinski at gmail dot com>
+"License: This program is free software. It comes without any warranty,
+" to the extent permitted by applicable law. You can redistribute
+" it and/or modify it under the terms of the Do What The Fuck You
+" Want To Public License, Version 2, as published by Sam Hocevar.
+" See http://sam.zoy.org/wtfpl/COPYING for more details.
+"
+"============================================================================
+if exists("loaded_scala_syntax_checker")
+ finish
+endif
+let loaded_scala_syntax_checker = 1
+
+"bail if the user doesnt have the scala binary installed
+if !executable("scala")
+ finish
+endif
+
+if !exists("g:syntastic_scala_options")
+ let g:syntastic_scala_options = " "
+endif
+
+function! SyntaxCheckers_scala_GetLocList()
+ let makeprg = 'scala '. g:syntastic_scala_options .' '. shellescape(expand('%')) . ' /dev/null'
+
+ let errorformat = '%f\:%l: %trror: %m'
+
+ return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })
+endfunction
+
Something went wrong with that request. Please try again.