Closed venantius closed 8 years ago
I definitely ran into a problem like this when I was first working on Whidbey. The root cause is that your values are getting pretty-printed twice, so the second pass is rendering the string value output by the first pass. Same reason I had to forcibly change the default pr-values
middleware into a no-op.
I'm not sure off the top of my head what the best workaround is.
Is it possible that it's an nREPL middleware ordering issue?
I had to think a bit about your comment but I figured it out. Just had to change the following piece of code and it started working:
(def handler
(do (whidbey/init! {})
(nrepl/default-handler #'highlight)))
Cool, glad you got it working.
Yo! It's me again. Not an Ultra question this time around, though.
I'd like to be able to have Whidbey's nREPL middleware work when I embed an nREPL server in my application. Thus far, I've been doing the following:
I've had quite a bit of trouble getting this to play nicely on the client-side, unfortunately. In one of my projects, if I also add whidbey to my project's plugin map, then when I
lein repl :connect
I do get syntax-highlighting at the REPL, but surrounded by quotes.If I try to do this in a bare-bones project that consists only of the relevant dependencies, running
lein repl :connect
ends up rendering and highlighting every value as a string (see screenshot, below).At least in the latter case, I don't have any other plugins in the project or in my profiles.clj, so there shouldn't be any interference.
Assuming this is just a matter of configuration, it would be great to update the README accordingly. If it's more complicated than that an requires code changes, let me know where to focus my attention and I can try to help.
Cheers!