Fork me on GitHub
#cider
<
2020-10-13
>
macroz06:10:04

I'm a little baffled but looks like .dir-local.el with cider-default-cljs-repl doesn't work if I cider-jack-in-cljs only when I cider-jack-in

macroz06:10:43

very baffled because I think it used to work, I can find issues of it working and not working, and even on this slack people suggesting it

macroz07:10:56

(obviously doesn't work with the regular jack-in)

jcf13:10:38

@U0PPLKYR4 double check you're using .dir-locals.el. Note locals is plural.

dpsutton13:10:44

Also it has a dot at the beginning

jcf14:10:37

Thanks, @dpsutton. I've updated my comment to include the leading dot. 🙂

macroz19:10:18

.dir-locals.el yes the filename is correct

macroz19:10:34

I'm currently using cider-version 1.0.0snapshot (package: <tel:202009131139|20200913.1139>)

macroz07:10:05

so can anyone just confirm that dir locals works for them using also shadow-cljs? I'll try debugging this

sylvain05:10:53

It works for me

sylvain05:10:29

I have this in my .dir-locals.el:

sylvain05:10:53

((nil . ((cider-clojure-cli-global-options . "-A:devtools:dev:shader-editor")
         (cider-default-cljs-repl . shadow)
         (cider-shadow-default-options . ":app")
         (cider-shadow-cljs-global-options . "-A:devtools:dev:shader-editor"))))

sylvain05:10:27

I mean the cider-shadow-cljs-global-options is correctly passed to shadow-cljs when doing cider-jack-in-cljs. I still get a popup asking me to chose between clojure-cli and shadow-cljs which is weird.

dpsutton12:10:04

If there are two project type files cider needs to ask which one to use. You can set cider preferred build tool if you like

sylvain07:10:21

Ah ok right. But there's no way to specify a different build tool for cider-jack-in-clj and cider-jack-in-cljs it seems. In my case I'm using clojure-cli for one and shadow-cljs for the other.

jcf13:10:30

Hi folks! I've been chatting over in #shadow-cljs about a problem with jacking into a CLJS REPL. https://clojurians.slack.com/archives/C6N245JGG/p1602593984417600 The gist of it is when I invoke cider-jack-in-cljs with a shadow-cljs project that uses tools.deps I'm told "No namespace: cider.piggieback found". I found the following issue, that was closed by a rather egregious bot without a fix (the suggestion was to manually configure things rather than relying on Cider's built-in support): https://github.com/clojure-emacs/cider/issues/2812 I've tried the suggested workaround and unfortunately it did not get me a working CLJS REPL. What I'm wondering is this: is this a combination of tools that people are using or have I wandered off the beaten path? Should I stick with Cider and Figwheel Main or do Cider and shadow-cljs play nice with a cider-jack-in-cljs?

dpsutton13:10:23

Shadow is phenomenal and you’re right where you want to be. The tooling is a little rough if you use deps to run shadow but is really nice if you use shadow to manage your deps

jcf13:10:09

Thanks, @dpsutton. That's what I'm thinking.

dpsutton13:10:03

If you look at the dir locals for lambda island “chui” it has some tricks to make deps managed shadow nicer though

jcf14:10:19

Evaling indent rules. Interesting.

zackteo21:10:08

May I ask what is the best way to handle the following? Other than restarting emacs entirely? Under sesman-restart for some cases and cider-restart for other cases. But what other ways of restarting cider are there? Other than closing emacs 😮

error in process filter: nrepl-send-sync-request: Sync nREPL request timed out (op clone id 1
error in process filter: Sync nREPL request timed out (op clone id 1)

hugo21:10:20

Well if your nrepl isn’t responding you can kill that process and then close the repl buffers.

zackteo21:10:18

@hybas3 Like the buffer? The error still occurs after killing the buffer and running cider-jack-in-cljs again

plins22:10:17

hello everyone, Im trying to customize the cider-jack-in command, I need to expose an env variable and use a custom lein command to open the repl the official docs state that ‘You can use C-u M-x cider-jack-in RET to specify the exact command that cider-jack-in would run. This option is very useful is you want to specify a something like a lein or deps.edn profile.’ Im using doom emacs with evil mode, so C-u takes me to beggining of the buffer is there any other way of doing that?

practicalli-john01:10:42

Perhaps Doom Emacs used SPC u as C-u , this is how Spacemacs calls the universal argument to modify the cider-jack-in command (and other things)

practicalli-john01:10:11

Doom has a discord channel, which may be useful of more use for Doon specific questions.

dpsutton22:10:25

do you know how to do a prefix argument in emacs?

plins22:10:49

Im afraid not

dpsutton22:10:15

did you try it from normal mode and insert mode? No idea how to do this in evil mode

dpsutton22:10:29

probably ask in #emacs to get more eyes on it

plins22:10:51

alright, I was wondering if there was a command, accessible by M-x that would do what C-u M-x cider-jack-in does, but thanks anyway 🙂

dpsutton22:10:47

no. cider-jack-in is the command. the prefix arg (`C-u`) is how you modify the command

🙏 3
macroz07:10:05

so can anyone just confirm that dir locals works for them using also shadow-cljs? I'll try debugging this