Fork me on GitHub

I'm on the native-comp branch and there's this issue with sayid: Any ideas for workarounds?


Hi! I am using emacs with cider and lein. I can get the repl started, but I cannot get buffer sexp eval at point, and the buffer itself seems unaware that cider is running. I read the documentation and watched videos demonstrating the interactive use, but I still cannot solve the problem.

Louis Kottmann10:11:24

hello lulian, do you have cider/cider-nrepl in your project.clj? is the cider-mode activated in your current buffer?


No, adding it now. Do I have to write a version, or if I don't, it will get the latest?

Louis Kottmann10:11:55

you have to write a version I believe

Louis Kottmann10:11:06

[cider/cider-nrepl "0.25.4"]

Louis Kottmann10:11:39

mind you, it you should be added as lein plugin (i.e: in the :plugins key)


Ok, I added it as a plugin, and it builds the project and starts the repl


but if I turn on cider-mode it still says not connected

Louis Kottmann10:11:52

did you cider-jack-in-clj?


I cider-jack-in-cljs


Do I have to also run the clj part?

Louis Kottmann10:11:18

that, I don't know, I don't use clojurescript


I thought they are made to work the same

Louis Kottmann10:11:48

but once you did cider-jack-in-cljs you should be able to C-M-x a sexp and it would be evaluated in the CIDER REPL


alright, I will try clj

Louis Kottmann10:11:15

do you code in clojurescript or clojure?




But I may be able to solve the problem with clojurescript myself, if I manage to run clojure correctly

Louis Kottmann10:11:16

I know there are a couple of gotchas with cljs, but clj should work out of the box yes


The thing is, I do cider-jack-in-clj, it starts the repl correctly, but the buffer is still cider [not connected]

Louis Kottmann10:11:16

any interesting error in C-h e ?


No, just the usual "starting server, connecting to server"


[nREPL] Starting server via /usr/bin/lein update-in :dependencies conj \[nrepl\ \"0.8.2\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.25.4\"\] -- repl :headless :host localhost
You can run the command ‘cider-jack-in-clj’ with C-c M-j
[nREPL] Starting server via /usr/bin/lein update-in :dependencies conj \[nrepl\ \"0.8.2\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.25.4\"\] -- repl :headless :host localhost
[nREPL] server started on 36699
[nREPL] Establishing direct connection to localhost:36699 ...
[nREPL] Direct connection to localhost:36699 established

Louis Kottmann10:11:07

can you access your namespaces in the repl at all?

Louis Kottmann10:11:15

, ns in CIDER buffer


Yes, I switched it to cider-nrepl just now


to try out the command


cider.nrepl, sorry

Louis Kottmann10:11:20

well, it's working


I got it working in the buffer as well


Thank you!

Louis Kottmann10:11:27

here begins the fun


I will now debug the cljs one


The figwheel-main template is a useful way to create a new project that should work as is with cider-jack-in-cljs Here is an example


that depends. When connecting to repl, cider will prompt several options. Choose the correct one, and remember also open a navigator to run the cljs code.


The main problem, that I still have not solve yet, is that when I choose the figwheel option, emacs opens the repl in a new buffer, but the original buffer remains in the cider [not connected] state


When I choose the browser option, it actually works and connects correctly


If figwheel-main fails, then the project is probably not configured to run figwheel-main build tool for Clojurescript


It fails with plain figwheel only in the sense that it does not connect the buffer to the repl. Everything else works. The browser renders the application.