Fork me on GitHub
#vim
<
2016-09-07
>
jiangts05:09:43

can anybody point me in the right direction for connecting fireplace to a browser repl?

jiangts05:09:07

read a bunch of tutorials, tried weasel and austin but couldn't quite get it working

jiangts05:09:35

got a bunch of brepls working, just none that fireplace could piggieback to 😞

jiangts05:09:45

(or maybe I'm just dumb :D)

mikepjb08:09:24

@jiangts try running lein repl :connect 9999

mikepjb08:09:47

once in the repl run (use ‘figwheel-sidecar.repl-api) followed by (start-figwheel)

mikepjb08:09:00

it’s a bit hacky but should do what you want

dominicm08:09:00

@mikepjb That won't connect fireplace to it though (no jump to definition, or :Eval support)

dominicm09:09:33

@jiangts The simplest way is to use boot-cljs-repl (as part of a boot project). As it supports fireplace out of the box. I'd suggest https://github.com/juxt/edge as a starting point if you're switching from lein. If you're stuck with a leiningen project, https://github.com/tpope/vim-fireplace/pull/222 this patch is your solution. I recently PR'd into figwheel a fix for Fireplace, so everything should work (I use this patch)

juhoteperi16:09:01

@dominicm Hmm, was a fix merged to figwheel? I have one open RR regarding this problem

juhoteperi16:09:54

does everything work correctly without that?

dominicm16:09:03

@juhoteperi: I was thinking of the message id bug, that's why the fireplace patch is still needed

juhoteperi16:09:03

that PR is alternative to fireplace#222

dominicm16:09:40

@juhoteperi: I'm kinda torn between those patches.

dominicm16:09:18

Glad it's not just me 😃

juhoteperi16:09:13

Maybe it would be better if Figwheel provides the repl-env API, but the PR should be reworked to properly share code with the other codepath

dominicm16:09:26

I agree on that.

dominicm16:09:36

But it might be good for vim to be more agnostic in preparation for a new repl env