scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

Syntax coloring/highlighting in the REPL #4223

Open scabug opened 13 years ago

scabug commented 13 years ago

= 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.

scabug commented 13 years ago

Imported From: https://issues.scala-lang.org/browse/SI-4223?orig=1 Reporter: @soc Assignee: @puffnfresh

scabug commented 13 years ago

@paulp said: Yeah, this would be cool.

scabug commented 13 years ago

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.)

scabug commented 11 years ago

@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.

scabug commented 10 years ago

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 :)

scabug commented 10 years ago

@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.

scabug commented 10 years ago

@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?

scabug commented 10 years ago

@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.

scabug commented 10 years ago

@retronym said: Sounds GTM. wrt the color choice, it would be important to find defaults that works on dark and light terminals.

SethTisue commented 6 years ago

Ammonite has it, Dotty has it.