I'm on the native-comp branch and there's this issue with sayid: https://github.com/clojure-emacs/sayid/pull/59 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.
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?
you have to write a version I believe
[cider/cider-nrepl "0.25.4"]
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
did you cider-jack-in-clj
?
I cider-jack-in-cljs
Do I have to also run the clj part?
that, I don't know, I don't use clojurescript
I thought they are made to work the same
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
do you code in clojurescript or clojure?
clojurescript
But I may be able to solve the problem with clojurescript myself, if I manage to run clojure correctly
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]
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
```looks good
can you access your namespaces in the repl at all?
, ns
in CIDER buffer
Yes, I switched it to cider-nrepl just now
to try out the command
cider.nrepl, sorry
well, it's working
^^
I got it working in the buffer as well
👌
Thank you!
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 https://practicalli.github.io/clojurescript/web-design-basics/clojurebridge-london-website/create-project.html