Fork me on GitHub
#cider
<
2023-10-02
>
Casey07:10:49

I am editing a cljs (shadow-cljs) project that has a clj and cljs repls. Both are configured with nrepl. I am seeing double dispatch in cljc files to both repls. Is this possible to turn off? https://docs.cider.mx/cider/0.24/usage/managing_connections.html if i am readit it correctly, says that it should only dispatch to the "most recently viewed REPL of the relevant type".

vemv07:10:02

You're checking out the docs for 0.24 which is pretty old. Hopefully it wasn't google that directed you there? :)

vemv07:10:46

Answering to your q, we now have cider-clojurec-eval-destination as documented on https://docs.cider.mx/cider/cljs/up_and_running.html#working-with-cljc-files (Git master or melpa snapshot only)

Casey08:10:19

oh crikey didn't notice the version of the docs.. i think i landed there from a slack search :face_palm:

Casey09:10:46

@U45T93RA6 is there a way to target a clj or cljs repl specifically when using cider-nrepl-sync-request:eval in emacs?

Casey09:10:03

I want to be able to eval some clj code via a shortcut when my open buffer is cljs

vemv09:10:02

Yes, pass as the connection argument: (cider-current-repl 'cljs 'ensure)

馃帀 1
Casey11:10:15

Works perfect thanks

cider 1
14:10:33

Hello, I've seen some folks have their require section automatically filled when using emacs

vemv14:10:32

it's cljr-slash from clj-refactor.el 馃檪

15:10:54

oh nice

15:10:00

thanks!

馃嵒 1
practicalli-johnny15:10:33

It could also be Clojure Lsp which has a feature to add requires when using functions from a different library/namespace

14:10:39

is this a cider function

14:10:51

for example, typing (str/replace) auto adds [clojure.string :as str] to the (ns (:require...))