Fork me on GitHub
#vim
<
2018-04-20
>
severo12:04:17

anybody using vim-fireplace with piggieback to develop in cljs?

severo12:04:36

Can't get it to work. Although for clj it works fine.

severo12:04:15

keep getting a Fireplace: class java.lang.ClassNotFoundException

dominicm13:04:14

@danielsouzasevero what steps are you taking? what's your setup?

severo13:04:51

i'm using lein, i set it up using the config from the docs

:profiles {:dev {:dependencies [[cider/piggieback "0.3.1"]
                              [org.clojure/tools.nrepl "0.2.13"]]
               :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}}})

severo13:04:20

i then open up a repl with lein repl and run (cider.piggieback/cljs-repl (cljs.repl.nashorn/repl-env))

severo13:04:53

I then try to use it in nvim with usual commands like cqp, but I keep getting that error.

severo13:04:11

i'm pretty sure i'm missing something

dominicm13:04:02

@danielsouzasevero cider/piggieback isn't supported by fireplace, see my PR if you're determined to use it: https://github.com/tpope/vim-fireplace/pull/311 Alternatively, install 0.2.2 of com.cemerick/piggieback instead.

severo13:04:12

interesting

severo13:04:33

i'm fine with using com.cemerick/piggieback 0.2.2

severo13:04:48

let me try it out here hold on

severo13:04:22

@dominicm should I change cider.piggieback/wrap-cljs-repl to com.cemerick.piggieback/wrap-cljs-repl also?

dominicm13:04:08

You don't need to call anything from lein repl, once you've done lein repl, you're good to go in vim

severo13:04:11

lol, running evaluating (+ 2 2) with cqp froze my nvim

severo13:04:12

so i removed cider.piggieback/wrap-cljs-repl

dominicm13:04:38

Sorry, I was not paying enough attention

dominicm13:04:02

@danielsouzasevero cemerick.piggieback/wrap-cljs-repl is the middleware, confusing, I know.

severo13:04:41

yeah, put it back

severo13:04:46

looks like i was using lein wrong

severo13:04:24

been using python for so long that I got used to conda and never had to set anything up ever again, haha

severo13:04:13

very strange, tried to open the repl now and got

Error loading cider.piggieback: Could not locate cider/piggieback__init.class or cider/piggieback.clj on classpath.
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context, compiling:(/tmp/form-init8031655535709059011.clj:1:1446)

severo13:04:25

with lein with-profile +dev repl

dominicm13:04:43

@danielsouzasevero modify your project.clj to have cemerick.piggieback/wrap-cljs-repl in place of cider.piggieback/wrap-cljs-repl

toot 4
severo13:04:16

still new to this, i find it quite confusing

severo13:04:15

+7 productivity

severo13:04:34

+10 enlightenment

dominicm13:04:28

Maybe I should write this up somewhere in a convenient manner 🙂

dominicm13:04:35

with pictures!

severo14:04:38

yeah, would help a lot!

severo14:04:01

maybe complementing the vim-fireplace documentation

severo14:04:26

but not exhaustively

severo14:04:03

i can help you review it if you are interested 🙂

eraserhd17:04:34

I am becoming more convinced the Vim plugins should do one small thing well.

eraserhd17:04:27

I was planning on making parinfer-rust into an uber-plugin that did things like namespace tracking and fixes up copy/paste indent, and so on and so on, but I'm realizing this is a bad idea.

dominicm17:04:26

what convinced you of it being a bad idea?

eraserhd17:04:53

Well, not being able to use replant 🙂

eraserhd17:04:37

Also, fzf vs. fzy.

eraserhd18:04:30

Well, fzf vs. fzy and nvim vs. vim8, both because of replant.

eraserhd18:04:09

I imagine (this might not be well thought out) there is a place for a mega-plugin, but that it should be composed of single-feature plugins.

eraserhd18:04:16

So, like, parinfer-rust should be an awesome parinfer plugin, but not do other things that other people might not want or might not work in their environment, so anyone who wants to use the feature can.

dominicm18:04:30

@eraserhd replant is about vim8 & neovim disagreeing on how to implement async mostly though. Making it smaller wouldn't help.

dominicm18:04:40

I can't comment on fzf vs fzy 🙂

dominicm18:04:55

@eraserhd if you have recommendations, I'd be glad to hear them though. Replant is far from being above criticism.

dominicm18:04:00

and me especially 🙂

eraserhd18:04:16

Well, I suspect the best next step for everybody is to get async nrepl connections portably available. I've been thinking about whether fireplace or replant (or something else) is the right place to do that. I haven't looked at code yet, though.

dominicm18:04:52

A few attempts at bolting-on async into fireplace have been looked into, it's non-trivial from what I saw.