Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom value rendering middleware #12

Closed
cemerick opened this issue Nov 6, 2017 · 4 comments
Closed

Support custom value rendering middleware #12

cemerick opened this issue Nov 6, 2017 · 4 comments

Comments

@cemerick
Copy link
Collaborator

cemerick commented Nov 6, 2017

Currently, nREPL's interruptible-eval middleware hardcodes a dependency on pr-values. It would be nicer if the user could either specify alternate rendering middleware or if nREPL's built-in middleware accepted an arbitrary function to render values with. Specifically, this would enable pretty-printing REPL output.

I've set up a middleware to demonstrate this, in combination with the Puget printing library:
https://github.com/greglook/whidbey

Currently it is possible to replace the default middleware, but it involves some ugly runtime metadata manipulation which reaches into the nREPL internals. Addressing this would be another step towards simplifying pretty-printing/color integration in the REPL.

(from https://dev.clojure.org/jira/browse/NREPL-55)

@bbatsov
Copy link
Contributor

bbatsov commented May 12, 2018

@greglook Would you be interested in contributing this upstream?

Now we're back in the business of accepting PRs! 🎉

@arrdem
Copy link
Contributor

arrdem commented May 12, 2018

Hummmm this could also drastically simplify the implementation of content-type handlers...

@greglook
Copy link
Contributor

Might be able to look at this in a few days; it'd certainly be nice to ditch the metadata wrangling.

@bbatsov
Copy link
Contributor

bbatsov commented May 24, 2018

@greglook Certainly! 👍

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

No branches or pull requests

4 participants