Fork me on GitHub
#vim
<
2018-09-24
>
markx18:09:35

Hi, what’s the relationship between fireplace, piggieback and figwheel? do I need to use all of them to do clojurescript dev using vim?

andrewguy918:09:46

I’ve been fighting with this as well. fireplace is a vim plugin which can speak the nrepl protocol. Piggieback is a bridge between nrepl and clojure script. It seems to use dark magic. figwheel allows you to live edit your code and have the changes appear in the browser. Also uses the dark arts.

andrewguy918:09:38

I only got it all working friday. But I can edit code in vim and have it reflect in chrome.

Hukka05:10:27

@markx @athomsonguy They are not really bound together. You can use figwheel without using a repl at all, it just hotreloads the code then. You can use piggieback without hot reloading. And you can use fireplace without even working with clojurescript. But to connect to clojurescript repl with fireplace, you do need to somehow upgrade the nrepl sessions from clj to cljs, and piggieback is one way (though not the only one).

👍 8
markx23:10:11

@tomi.hukkalainen_slac So if I use figwheel without a repl, it will hotreload code when files are saved, right? And the repl is for eval code without saving the file? So do I still need repl when I have figwheel?

llsouder23:10:36

The figwheel repl will let interrogate the values on the page too. super useful for debugging user interaction.

markx02:10:13

@U63JKCFC3 I see. So it’s not only for eval.

markx03:10:28

I was just about to ask about shadow-cljs, as it doesn’t need piggieback.

Hukka06:10:27

Yes, figwheel will reload without a repl, just watghinc the files. Repl is for evaling, of course, but that has many uses. Trying out if something works, exploring a data structure, getting docs etc etc. Fireplace expects a repl for many of its functions, but that doesn't have to be a cljs repl, for most things plain clj will do as well. When using shadow, it will handle the parts that are normally done by figwheel and piggieback.

Hukka05:10:27

@markx @athomsonguy They are not really bound together. You can use figwheel without using a repl at all, it just hotreloads the code then. You can use piggieback without hot reloading. And you can use fireplace without even working with clojurescript. But to connect to clojurescript repl with fireplace, you do need to somehow upgrade the nrepl sessions from clj to cljs, and piggieback is one way (though not the only one).

👍 8
markx23:10:11

@tomi.hukkalainen_slac So if I use figwheel without a repl, it will hotreload code when files are saved, right? And the repl is for eval code without saving the file? So do I still need repl when I have figwheel?

Hukka06:10:27

Yes, figwheel will reload without a repl, just watghinc the files. Repl is for evaling, of course, but that has many uses. Trying out if something works, exploring a data structure, getting docs etc etc. Fireplace expects a repl for many of its functions, but that doesn't have to be a cljs repl, for most things plain clj will do as well. When using shadow, it will handle the parts that are normally done by figwheel and piggieback.