Fork me on GitHub
#cider
<
2019-09-10
>
magnars08:09:22

did the sesman-integration recently change? I just updated cider, and when I do C-c C-s s to connect a sibling, I get a Select command: prompt with nothing suggested.

magnars08:09:14

Usually it would suggest a whole series of cider-connect-* commands

magnars12:09:26

Disregard that. For some other reason my completing-read is not completing anything anymore.

dpsutton12:09:14

do you use use-package and the lazily loaded helm/swiper hasn't been loaded yet?

magnars12:09:41

No, that's not it. But I do use several ido-packages. Luckily I made a backup of my elpa-directory before upgrading, so I'll now dig in and find the culprit with some good old bisecting.

parens 1
magnars12:09:03

Turns out it was my fault all along, unsurprisingly, I just noticed it right after upgrading cider. I had a function that would temporarily disable ido-ubiquitous-mode - and then sometimes fail to enable it again. Fixed with an unwind-protect

Yehonathan Sharvit13:09:50

Hello there Is there a way to automagically inject figwheel main when lauching a cljs repl. I am getting this error

error in process filter: Figwheel-main is not available.  Please check 

pez14:09:56

This seems to be the relevant doc. https://docs.cider.mx/cider/basics/clojurescript.html#_using_figwheel_main You can add [com.bhauman/figwheel-main"0.2.3"] to your user deps.edn, if no one here shows up and tells us that it can be configured to be inlcuded in jack-in.

robertkrahn16:09:06

It should be enough to do (cider-add-to-alist 'cider-jack-in-cljs-dependencies "com.bhauman/figwheel-main" "0.2.3") I believe.

dpsutton16:09:36

much better to put it in an alias or a profile

dpsutton16:09:55

adding it to that alist will put it in every cljs project which seems inadvisable

pez16:09:18

Unless the alist thing can be made so that it is “workspace” (using vscode terms…) local?

Yehonathan Sharvit19:09:10

@dpsutton Why is it better to put it in an alias or a profile?

dpsutton19:09:11

It’s a true dependency of your project. Nothing cider specific but your project depends on figwheel main

👍 1
pez19:09:32

The development of the project depends on Figwheel Main. So it is not clear cut, I’d say. But, yeah, there are profiles for that, of course. Yet, it is also something CIDER could help with, when it sees that Figwheel Main is involved. Calva does, because I think it makes sense.

dpsutton19:09:47

sure. so put it in a dev profile/alias

dpsutton19:09:11

if you don't have that, how would anyone run your project. its not piggieback that a CIDER dep needs, its a dep required to compile your cljs

dpsutton19:09:33

CIDER shouldn't help with this because people not using CIDER need this as well

👍 2
pez19:09:19

Yes, makes sense.

Yehonathan Sharvit19:09:21

@dpsutton any idea how to add figwheel-main to dev profile for clojure-cli and let CIDER aware of it?

dpsutton19:09:01

do you mean how do you start CIDER with a profile/alias?

magnars19:09:57

@viebel Add a .dir-locals.el file to root of project, specifying it for cider. Here's mine:

((nil
  (cider-clojure-cli-global-options . "-A:dev")
  (cider-default-cljs-repl . figwheel-main)
  (cider-figwheel-main-default-options . ":dev")))

dpsutton19:09:26

just stick it in the dev profile. then you can use dir locals as posted above or you can use a prefix argument when jacking-in to edit the command

Yehonathan Sharvit19:09:14

how do I pass aprefix arg to jack-in command? Sorry I am new to spacemacs?

dpsutton19:09:46

i actually don't know for spacemacs. But for emacs, the normal cljs-jack in command is C-c M-J and to send the prefix is C-u C-c M-J

dpsutton19:09:57

its just a control U before the normal invocation

dpsutton19:09:04

and quite possibly its the same

Yehonathan Sharvit20:09:51

Thanks a lot @dpsutton and @dpsutton. You helped me made another small but significant step towards the epiphany

cider 1
👍 1
dominicm20:09:14

So useful he thanked you twice 😄

😜 1
dpsutton20:09:38

thank @magnars for the helpful .dir-locals.el syntax. i get that wrong three times every time

Yehonathan Sharvit20:09:11

(Sorry for the typo @dominicm)

😜 2