question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Colorized Scala REPL

See original GitHub issue

I’d like to be able to get the equivalent of scala -Dscala.color when running sbt console. Perhaps with a new SettingKey called scalaOptions that would be used as follows:

(scalaOptions in console) += "-Dscala.color"

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dwijnandcommented, Jul 10, 2015

One way to do this is to create ~/.sbt/0.13/colour.sbt with:

initialize ~= (_ => if (ConsoleLogger.formatEnabled) sys.props("scala.color") = "true")
0reactions
jawshooahcommented, Jul 12, 2015

Makes sense. Thanks for the help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use color in the Scala REPL | alvinalexander.com
This image shows how to use color syntax highlighting in the Scala REPL. In short, just start the REPL like this: $ scala...
Read more >
Using colors in Scala Console - Stack Overflow
It works if your console supports color. I just tried it on a linux system via putty and got the expected result. Edit:...
Read more >
How to use color in the Scala REPL - Reddit
Hmm. I've just tried entering set scalacOptions += "-Dscala.color". and set scalacOptions in (Compile, console) += "-Dscala.color".
Read more >
Is it possible to set the color for scala shell - Question
Scala 3 REPL uses totally different colors. I think these colors are hard-coded. You would have to manually change your own terminal colors...
Read more >
Scala Interpreter background color - Google Groups
I am running the Eclipse Scala IDE plugin 4.0.0 on Luna/MacOS. The Scala Interpreter View's output has two panes. The upper pane comes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found