JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
887 stars 104 forks source link

Connect to remote nREPL server #137

Open JonyEpsilon opened 10 years ago

JonyEpsilon commented 10 years ago

It would be nice if Gorilla could connect to an already running/remote nREPL sever. The sticking point is that Gorilla needs to insert its own middleware, and I don't think that's possible at the minute in a running nREPL server. There's been some discussion here https://github.com/clojure-emacs/cider/issues/720 about the value of being able to change the nREPL middleware at runtime.

cursork commented 10 years ago

As a sign of interest, I've done a very basic version of this for a professional project myself.

My 2 cents would be:

  1. Provide a convenience function to add the cider + gorilla middlewares when starting an embedded nrepl - I had to do this manually in the app
  2. Add an option to the config for connecting to a remote instead - I simply hacked this in https://github.com/cursork/gorilla-repl/compare/remote-nrepl

If it's impossible to add middleware on the fly, expecting the remote repl to have the middleware already seems like a reasonable interim solution to me.

JonyEpsilon commented 10 years ago

Thanks for the notes. I'm a bit busy at the moment to get much done on Gorilla, but remote REPL is high on my list once I have some more time :-)

anujsrc commented 9 years ago

@cursork - this looks like a good one to have for the time being- https://github.com/cursork/gorilla-repl/compare/remote-nrepl :+1: