After spending several hours spread across 2 or 3 days I’ve finally arrived at a (more or less) usable Scala Dev environment on Vim.
I’ve outlined my setup below!
Goals
- Code Completion - Done
- Syntax Highlighting - Done
:A
access to tests (Alternates) - Pending
Guide
-
Install Java 8 (I initially had 1.7 installed it was effectively unusable due to constant
outOfMemory
issues)# Update brew cask brew cask update # Install latest Java brew cask install java
-
Install eclim
-
Launch eclimd
<eclipse_dir>/eclimd
-
Install Typesafe Activator
-
Create Scala Project
activator new
-
Add
sbteclipse
plugin# Add to <project_dir>/project/plugins.sbt addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0")
-
Create eclipse project with sbt
sbt eclipse
-
Import eclipse project with eclim
# Within Vim :ProjectImport .
Notes
In my case I’m using YouCompleteMe, so I had to force eclim to integrate with omnifunc:
" In your .vimrc
let g:EclimCompletionMethod = 'omnifunc'