Fork me on GitHub

Hi! I'm trying to switch from IntelliJ to spacemacs + clojure layer and got a question about cider-jack-in-clojure and cider-jack-in-clojurescript. Currently my project structure is

when I start first connection using cider-...-clojure to file in clj directory it works fine, however second connection as clojurescript give me the note about reusing sibling connection A session with the same parameters exists (...). You can connect a sibling instead. Proceed? (y or n) And then I'm getting the error: user-error: No cljs REPLs in current session To be able to use this clojurescript REPL correctly I need to manually assign cljs and clj dirs using sesman-link-with-directory . I hope I made the problem clear 😉 Now the question - Is there any easy solution so I don't have to do this manually each time? Maybe some way to setup this globally, so each time clj and cljs directories are linked correctly?


Have you tried cider-jack-in-clj&cljs ? Or running the ClojureScript Repl from the Clojure Repl prompt? Do you have an example of the project you can share? Or are you using a template to create the project? Not sure how to reproduce this issue otherwise


I'd need to create some minimal project for you to reproduce the issue. I'll also later try the clj&cljs, but I have the feeling that tried it and it didn't work. After talking with @UB0EMUD34 who experienced the same issue - he has found a solution and created PR today - Comments are welcome.

Michael Stokley15:10:54

is there a way to eval an expression and yank it?


I am not aware of a single command to do that, curious as to the use case. You could write and elisp function to do both with one key binding.

Michael Stokley20:10:14

yeah, maybe a custom function is the right approach here. during local development i often find myself evaluating expressions and then yanking the contents for use elsewhere. for example, today i needed to know the value of (inst-ms (.plus (Instant/now) (Duration/ofDays 3))) to test an endpoint that takes date range parameters


I am also interested to see what a good answer is. I usually do evil-cp-evil-copy-paste-form (M-w) then cider-eval-last-sexp-and-replace (SPC m e w)