Leiningen PluginΒΆ

pretty can act as a plugin to Leiningen.

To enable pretty exception reporting automatically, add pretty to both the :plugins and the :dependencies lists of your project.clj.

(defproject ...
 :plugins [[io.aviso/pretty "1.0.0"]]
 :dependencies [...
                [io.aviso/pretty "1.0.0"]]
 ...)

Adjust the version number for the current version, “0.1.26”.

This adds middleware to enable pretty exception reporting when running a REPL, tests, or anything else that starts code in the project.

Another option is to add the following to your ~/.lein/profiles.clj:

:pretty {
  :plugins [[io.aviso/pretty "1.0.0"]]
  :dependencies [[io.aviso/pretty "1.0.0"]]
}

This creates an opt-in profile that adds and enables pretty exception reporting.

You can then enable pretty in any project, even one that does not normally have pretty as a dependency, as follows:

lein with-profiles +pretty run

or:

lein with-profiles +pretty do clean, test, install

You may also want to add the following to your ~/.bash_profile:

alias pretty="lein with-profile +pretty"

At which point, you can use the command pretty instead of lein.