tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Clojurescript and node #129

Closed rburns closed 10 years ago

rburns commented 10 years ago

Is connecting to a node backed repl for clojurescript development supported? (I've not yet had luck in getting it to work)

I've tried two approaches:

1) connect to an nrepl from vim-fireplace. the nrepl is run using the method described at the bottom of the page here: https://github.com/bodil/cljs-noderepl Though, using code from this more up-to-date fork: https://github.com/dzacarias/cljs-noderepl The nrepl connection is initiated using :Connect in vim.

This appears to result in clojurescript still being sent to Rhino. any calls into the node environment (eg 'require') fail. Everything else looks to work well.

2) use vim-fireplace Piggieback support. Run a noderepl using 'lein trampoline noderepl'. connect via :Piggieback {env} from within vim.

Not certain what this results in. I've not been able to suss out the right env to pass in.

tpope commented 10 years ago

You definitely want the piggieback approach. Based on the instructions given, the right {env} is probably (node/repl-env), but I haven't tried it.

rburns commented 10 years ago

Thanks, I think I've got it working. by the following method:

the release version of cljs-noderepl may work. though I encountered errors when referencing it from within the clojure repl.

joakin commented 10 years ago

I have an example project that works with @rburns instructions, it may be useful. https://github.com/joakin/cljs-node-repl The new version of cljs-noderepl is already in clojars working perfectly.

bhurlow commented 8 years ago

@joakin @rburns have either of you had luck using fireplace + node with the new clojurescript repl changes? Seems like the cljs-noderepl may no longer be needed?

rburns commented 8 years ago

I've not yet tried it. Would be interested to know any any success you might have.

joakin commented 8 years ago

Same as @rburns. I launch and play with figwheel relpls manually, but haven't tried connecting directly.