Support custom value rendering middleware

Description

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.

Environment

None

Activity

Show:

Alex Miller June 26, 2019 at 3:52 AM

All nrepl tickets closed, now managed at https://github.com/nrepl/nrepl

Won't Fix

Details

Assignee

Reporter

Affects versions

Priority

Created May 13, 2014 at 11:55 PM
Updated June 26, 2019 at 3:52 AM
Resolved June 26, 2019 at 3:52 AM