spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
Michał 2020-10-26T13:10:29.101500Z

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

src/
src/clj
src/cljs
src/cljc 
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?

2020-10-26T15:16:54.101900Z

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

practicalli-john 2020-10-26T19:51:51.102Z

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

practicalli-john 2020-10-26T19:56:10.102200Z

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.

Michał 2020-10-26T20:20:02.102400Z

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 @slawek098 who experienced the same issue - he has found a solution and created PR today - https://github.com/clojure-emacs/cider/pull/2923 Comments are welcome.

2020-10-26T20:27:14.103Z

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

➕ 1
refset 2020-10-26T20:38:17.103300Z

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)