Interactive Scala is an extension for Visual Studio Code. Inspired by Ionide F#, this extension lets you select Scala code and execute it in the Scala interpreter REPL by a quick keyboard shortcut.
The extension will automatically open a new integrated terminal and initialise the Scala interpreter upon opening a
Once in a
If you are to send single line to the interpreter, there's no need for selection at all! Just place the caret on the line and press the shortcut.
Shortcuts are not your style? You can now use the context menu as well! Just select some code and right click to send it to the interpreter.
The used REPL Scala interpreter can be changed through the VS Code preferences. You can currently choose between
Different requirements are applicable for the interpreter options.
If you are using the system-wide Scala installation, you must have installed the Scala binaries and added the
If you are using the project installation, you must have SBT installed. You should also have a Scala project in your working directory, otherise SBT will automatically instantiate it when you are using this extension. https://www.scala-sbt.org/download.html
The default shell for the integrated terminal on Windows (PowerShell) is known to cause problems with manual input to the Scala interpreter. Change the shell to e.g. Git Bash as a workaround.
The extension has not been tested on MacOS and Linux.
First stable version.