Open scabug opened 13 years ago
Imported From: https://issues.scala-lang.org/browse/SI-4223?orig=1 Reporter: @soc Assignee: @puffnfresh
@paulp said: Yeah, this would be cool.
Luigi Plinge (rbj2001) said: Something like they have on StackOverflow would be a lot better than nothing. Their scheme seems pretty simple: keywords dark blue, anything beginning with a capital letter light blue, numbers / anything between quotes or < > dark red, everything else black. (I haven't done more than a few minutes of analysis but this covers all examples I've looked at.)
@soc said: A simple, incremental improvement would be to have colored prompts, so that at least the definition and its results can be visually differentiated.
Stefano Sgorlon (gokyo) said (edited on Feb 8, 2014 2:01:59 PM UTC): I am looking at this issue. I try to fix it. I will update you once I have good news :)
@retronym said (edited on Sep 22, 2014 5:40:49 AM UTC): Coloured prompts have been proposed by @puffnfresh in https://github.com/scala/scala/pull/3993, assigning this ticket to him.
@puffnfresh said: Sounds like [~retronym] is happy to target the -Dscala.color flag for 2.11 but then change to JLine auto-detection in 2.12 so that we can get feedback on the bikeshed paint before committing to it?
@puffnfresh said: Think I'll write the auto-detection for Typelevel's scalac for our 2.11 compatible release, so we can test it out there.
@retronym said: Sounds GTM. wrt the color choice, it would be important to find defaults that works on dark and light terminals.
Ammonite has it, Dotty has it.
= problem = Currently there is no syntax coloring/highlighting in the REPL.
= analysis = Having syntax coloring/highlighting in the REPL would be very helpful for reading the code, spotting typos and other mistakes.
It would also be a great thing for beginners who are still learning the language and need some visual guidance.
= enhancement recommendation = Add syntax coloring/highlighting to the REPL.