Mert Nuhoglu
Mert Nuhoglu

Reputation: 10143

How to set default value for *print-length* in deps.edn

My need is similar to clojure - What's the correct way of providing a default value for print-length in profiles.clj? - Stack Overflow.

I want to learn how to set default value for *print-length* inside deps.edn instead of project.clj of leiningen.

Upvotes: 1

Views: 194

Answers (1)

Alex Miller
Alex Miller

Reputation: 70239

You can create a :repl alias in your deps.edn:

{:aliases {:repl {:main-opts ["-e" "(set! *print-length* 2)" "-r"]}}}

And then you can start a repl with that:

clj -M:repl
user=> (range 20)
(0 1 ...)

Upvotes: 1

Related Questions