I try to use LightTable with remote nrepl integrated into some existing system. I integrated LightTable middleware and everything works fine in general except for one issue: most of the time evaluated clojure code calls some existing functionality implemented in java that depends on some session specific context that is stored in ThreadLocal. I implemented own nrepl middleware that creates and stores this context in some map for each nrepl session. So basically I need some wrapper around eval call executed already in the same worker thread where eval is executed that allosw smth. like this
(do
(init-thread-local session)
(eval ...)
(clear-thread-local session))
where session is nrepl session.
Is it achievable somehow on LightTable level (or LightTable middleware) w/o modifications?
Thanks