I posted this question on Stack Overflow as well, so if you want some rep feel free to answer there. Here it is in full:
I’m running Sublime Text 3 Build 3117 on both OS X 10.10.5 and Ubuntu 16.04. I just installed Leiningen 2.6.1 on both, and I’m starting to play around in SublimeREPL. I’m following the lein tutorial. Here is my project.clj
, in case it matters:
(defproject my-stuff "0.1.0"
:description "Leiningen Tutorial Project"
:url "http://example.com/FIXME"
:license {:name "MIT"
:url "http://opensource.org/licenses/MIT"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:main ^:skip-aot my-stuff.core
:target-path "target/%s"
:profiles {:uberjar {:aot :all}}
:repl-options {
;; custom prompt
prompt (fn [ns] (str "> " ))
}
)
Now, when I run lein repl
in the my-stuff
directory from the command line and run an arbitrary command (I’ve been using (+ 1 2 3)
), it prints out the answer nicely:
However, if I run lein repl
from SublimeREPL with project.clj
focused, and run the same command, it echoes the command before printing the return value:
I’ve also created a lein trampoline run -m clojure.main
command for SublimeREPL, and it doesn’t have the echoing problem:
Basically, what I would like to do is be able to run a REPL using project.clj
, but not have every command echoed before the output is printed. I can’t seem to figure out how to run a trampoline REPL in Sublime using project.clj
, if that’s the best option. If there’s a different way, i.e., using lein repl
, I just want to get rid of the command echo, and make it look similar to what appears when I run it from the command line.