This PR improves the output of the print-var-documentation command.
current output:
new output:
The current code also depends on the stdout coming back to through the repl connection, which may not always happen. (It doesn't with the shadow-cljs repl I'm using.) The new code uses with-out-str to get the doc output through the return value.
I also added an allSessions option to NReplConnection.sendCommand to make it easier to switch all sessions to ClojureScript when using shadow-cljs or piggyback. This is needed because the new doc command uses displayInRepl: false and so the command goes to cmdSession instead of session. Users can define commands like this in their init.coffee / init.js to switch between Clojure and ClojureScript repls:
This PR improves the output of the print-var-documentation command.
current output:
new output:
The current code also depends on the stdout coming back to through the repl connection, which may not always happen. (It doesn't with the shadow-cljs repl I'm using.) The new code uses with-out-str to get the doc output through the return value.
I also added an
allSessions
option toNReplConnection.sendCommand
to make it easier to switch all sessions to ClojureScript when using shadow-cljs or piggyback. This is needed because the new doc command usesdisplayInRepl: false
and so the command goes tocmdSession
instead ofsession
. Users can define commands like this in their init.coffee / init.js to switch between Clojure and ClojureScript repls: