emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
anonimitoraf 2020-11-15T08:56:32.154Z

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?

Iulian 2020-11-15T10:11:54.156600Z

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 Kottmann 2020-11-15T10:13:24.157700Z

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

Iulian 2020-11-15T10:18:09.158200Z

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

Louis Kottmann 2020-11-15T10:20:55.158400Z

you have to write a version I believe

Louis Kottmann 2020-11-15T10:21:06.158600Z

[cider/cider-nrepl "0.25.4"]

Louis Kottmann 2020-11-15T10:21:39.159Z

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

Iulian 2020-11-15T10:24:49.159600Z

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

Iulian 2020-11-15T10:25:21.160300Z

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

Louis Kottmann 2020-11-15T10:25:52.160600Z

did you cider-jack-in-clj?

Iulian 2020-11-15T10:27:01.161Z

I cider-jack-in-cljs

Iulian 2020-11-15T10:27:08.161200Z

Do I have to also run the clj part?

Louis Kottmann 2020-11-15T10:27:18.161500Z

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

Iulian 2020-11-15T10:27:41.162200Z

I thought they are made to work the same

Louis Kottmann 2020-11-15T10:27:48.162700Z

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

Iulian 2020-11-15T10:27:50.162800Z

alright, I will try clj

Louis Kottmann 2020-11-15T10:28:15.163100Z

do you code in clojurescript or clojure?

Iulian 2020-11-15T10:29:00.163300Z

clojurescript

Iulian 2020-11-15T10:29:41.163900Z

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

Louis Kottmann 2020-11-15T10:30:16.164400Z

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

Iulian 2020-11-15T10:30:55.165100Z

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

Louis Kottmann 2020-11-15T10:31:16.165400Z

any interesting error in C-h e ?

Iulian 2020-11-15T10:31:48.165700Z

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

Iulian 2020-11-15T10:31:55.166Z

[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 Kottmann 2020-11-15T10:32:10.166200Z

looks good

Louis Kottmann 2020-11-15T10:33:07.166800Z

can you access your namespaces in the repl at all?

Louis Kottmann 2020-11-15T10:33:15.167100Z

, ns in CIDER buffer

Iulian 2020-11-15T10:34:32.167500Z

Yes, I switched it to cider-nrepl just now

Iulian 2020-11-15T10:34:35.167700Z

to try out the command

Iulian 2020-11-15T10:34:43.167900Z

cider.nrepl, sorry

Louis Kottmann 2020-11-15T10:35:20.168100Z

well, it's working

Louis Kottmann 2020-11-15T10:35:24.168300Z

^^

Iulian 2020-11-15T10:36:00.168500Z

I got it working in the buffer as well

Iulian 2020-11-15T10:36:09.168600Z

Louis Kottmann 2020-11-15T10:36:17.169Z

👌

Iulian 2020-11-15T10:36:22.169200Z

Thank you!

Louis Kottmann 2020-11-15T10:36:27.169500Z

here begins the fun

Iulian 2020-11-15T10:36:29.169600Z

I will now debug the cljs one

practicalli-john 2020-11-15T20:51:57.169700Z

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