For those that do not know what *print-length*
stands for:
If you (set! *print-length* 200)
, and you evaluate (range)
in a REPL, which normally causes an infinite list of numbers to get printed, only the first 200 numbers will get printed.
I'm trying to set this as a default for all my REPLs in profiles.clj
.
Right now I got this, but it doesn't work:
{:user {:plugins [[lein-swank "1.4.4"]
[lein-catnip "0.5.0"]]
:repl-options {*print-length* 200}}
:dev {:dependencies [[clj-ns-browser "1.2.0"]
[org.clojure/tools.trace "0.7.5"]]}}
What's wrong with this?
Update. Tnx Michal for answering this. My fixed profiles.clj
now looks like this. Note that it only works inside a project.
{:user {:plugins [[lein-swank "1.4.4"]
[lein-catnip "0.5.0"]]
:repl-options {:init (set! *print-length* 200)}}
:dev {:dependencies [[clj-ns-browser "1.2.0"]
[org.clojure/tools.trace "0.7.5"]]}}