Fork me on GitHub

@bozhidar @cichli How can we evaluate some code in the cljs buffer from within CIDER? Seems like that’d be the easiest way to fix


Looking at your research and the question I’m a bit confused - isn’t the problem that the wrong thing is passed to macroexpand?


I’ve no idea how to get the “right thing”. So the easiest thing to do seems to be to evaluate the macroexpand form in the cljs context and grab the result.


B/c we know that calling macroexpand in the cljs REPL does the right thing


A source buffer with a cljs connection would yield the same eval results.


The only difference is that for REPLs the connection type is always static, but for other buffers it’s inferred dynamically.


I don’t understand. Clearly there is some context for cljs that is not there for clj. Maybe some dynamic vars need to be bound? What I mean is that there’s no need to call cljs.analyzer/macroexpand-1. cljs.core/macroexpand-1 should work, if we provide the right context.


Probably you’re right, but keep in mind that in the middleware everything is Java code and that’s why everything we can do there is just use the cljs compiler state. That’s also how completion is implemented for Cljs. I’m not sure how we can evaluate real ClojureScript code there. Maybe looking to piggieback’s code would be informative?


For the evaluation - what we always do is to leverage piggieback in the underlying nREPL connection + whatever cljs REPL the user decide to start on top of it.


@bozhidar @cemerick Had some thoughts on CLJ-1146 and clojure-emacs/cider#1372: I'd ❤️ to get this fixed. The Unmatched delimited: ) message has driven me up the wall a few times.


Yeah, seems to me this can be fixed in nREPL, but I guess it should happen after the compatibility 0.3 release we’re waiting for right now.


Anything that can be done in cider-nrepl? Or does it have to be nREPL itself?


Once is done we can finally start hacking freely on nREPL and make some awesome improvements.


How can I connect figwheel repl to cider’s. Google search only gives me paid clojure courses as results