as @allanrenucci commented at https://github.com/scala/scala/pull/7645#issuecomment-454558554 , > [Here](https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/repl/JLineTerminal.scala) is the implementation in Dotty for reference. I believe it would be straigforward to port our [syntax highlighter](https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/printing/SyntaxHighlighting.scala) someone want to have a look and see it how even works? does it involve external dependencies? JLine info page on this is https://github.com/jline/jline3/wiki/Highlighting-and-parsing