Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax highlighting in Lein REPL?

I want to configure Lein so that I see a colored REPL, like Emacs' nREPL. How can I do this?

I couldn't find any help on Google. Do I need to learn Bash scripting first?

like image 931
Jay Somedon Avatar asked Oct 21 '13 16:10

Jay Somedon


2 Answers

Ultra, “a Leiningen plugin for a superior development environment”, highlights syntax well for REPL output, among other useful things.

screenshot of Ultra
At the moment, there are no plugins or stand-alone REPLs that highlight syntax for input.

like image 139
Zaz Avatar answered Nov 11 '22 18:11

Zaz


Whidbey “pretty-prints colored REPL values by default”, using Puget to do the actual pretty-printing. Whidbey’s README seems to indicate that you can install it for all Leiningen projects simply by adding the following :plugins value to your user profile at ~/.lein/profiles.clj:

{:user {:plugins [[mvxcvi/whidbey "0.5.0"]]}}

Though I personally couldn’t get it to work, no matter what I tried.

You can also look at the Colors page on REPLy’s wiki. (REPLy is the REPL built-in to Leiningen 2, and it integrates with nREPL.) For now, all that wiki page contains is a link to Whidbey, but it might be updated in the future.

like image 3
Rory O'Kane Avatar answered Nov 11 '22 18:11

Rory O'Kane