Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

improve the output format of print-var-documentation #319

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chriswatrous
Copy link

This PR improves the output of the print-var-documentation command.

current output:
image

new output:
image

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:

atom.commands.add('atom-workspace', 'proto-repl-custom:switch-to-shadow-cljs-app-repl', () =>
  protoRepl.executeCodeInNs('(shadow.cljs.devtools.api/nrepl-select :app)', {allSessions: true}));

atom.commands.add('atom-workspace', 'proto-repl-custom:exit-cljs-repl', () =>
  protoRepl.executeCodeInNs(':cljs/quit', {allSessions: true}));

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant