1

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.

akond
  • 15,865
  • 4
  • 35
  • 55
Mert Nuhoglu
  • 9,695
  • 16
  • 79
  • 117

1 Answers1

1

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 ...)
Alex Miller
  • 69,183
  • 25
  • 122
  • 167