I’d like to get a colored REPL for clojure code, similar to what you can do with IRB for Ruby.
Are there any libraries or settings for user.clj that provide automatic coloring of the REPL?
Example IRB:

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I do not know of any way to have the basic Clojure REPL, as started by something like
java -cp clojure.jar clojure.main, do syntax highlighting. If, however, you use Emacs & SLIME (the development environment of choice of a great part of the Clojure community!), then you can have the SLIME REPL highlight syntax likeclojure-modedoes.First, you’ll have to lift some code from the
clojure-modefunction (defined towards the top ofclojure-mode.el):Then add it to the
slime-repl-mode-hook:Et voilà, next time you connect to the SLIME REPL you’ll have
clojure-modesyntax highlighting available. If you use SLIME for Common Lisp too, you’ll want to tweak this so it doesn’t try to do Clojure highlighting with CL. Also, this is just a first approximation; one thing it sort of breaks is prompt highlighting (thenamespace>thing will not be highlighted anymore). I’m not a proficientfont-lockhacker by any stretch of the imagination, though, so I’ll leave it at that. 🙂