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?
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?
Ultra, “a Leiningen plugin for a superior development environment”, highlights syntax well for REPL output, among other useful things.
At the moment, there are no plugins or stand-alone REPLs that highlight syntax for input.
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.
You don't have to use Bash for this at all – the shell only starts processes on the command-line, but they can be written in any language.
I don't think nREPL or its terminal client which is integrated into Leiningen as lein repl, REPL-y, provide any support for syntax colouring themselves. So the most promising approach is probably to fork REPL-y and integrate syntax colouring into it yourself, probably based on some existing syntax colouring solution for Clojure.
From emacs client you can try emacs-live
https://github.com/overtone/emacs-live#colour
Colour
Colour highlighting in two flavours - cyberpunk and gandalf. Use color-theme-cyberpunk and color-theme-gandalf to switch between the two themes. Currently cyberpunk has seen more love - patch requests accepted for appropriate improvements to Gandalf.
© 2022 - 2024 — McMap. All rights reserved.