Fork me on GitHub
#cider
<
2021-01-28
>
stuartrexking05:01:42

I can connect to a shadow-cljs nrepl and execute code from the repl window (js/alert etc). When I try to evaluate code, it fails. The repl is “pending-cljs” in the buffer window. Any ideas on how to figure out how to evaluate from code in cljs with shadow?

stuartrexking05:01:22

Also, when I’m in a clojurescript file i get cider[not connected]

David Pham06:01:58

Do you have the latest version of cider and shadow-cljs? If yes, insure you have nrepl/piggieback as dependency

David Pham06:01:38

[this how I solved a similar problem in the past{

bozhidar07:01:14

@neo2551 Technically speaking, shadow-cljs doesn't use piggieback - it implements its own version of it.

David Pham07:01:33

Okay! Thanks for the details :) but I did have the same problem, and it was solved by just adding the deps [maybe just correlation].

David Pham07:01:04

One day I should start getting interested in my tools, but I fear so much :)

David Pham07:01:22

I still can’t understand how to make an async call with cider to the repl haha

bozhidar07:01:42

Via the API?

kingcode21:01:55

Hello! I have been trying to write a fn which pages through a seq of items, and pauses b/w page-size items: what is the simplest way to read a single char from the console? I have tried (read), and various use cases of jline and http://java.io readers, but most of the time the readers destroy my cider session, or I have to enter an entire clojure form + Enter, etc…any ideas? Thx!

FiVo21:01:58

Have you tried read-line?

kingcode21:01:19

I was trying to trigger a reaction on a single keystroke, but will use that if nothing else works..

kingcode21:01:27

The ideal would be a read-char 🙂

kingcode21:01:43

I was curious to see if clojure-lanterna/curses might do the trick, but there is a learning curve and use warnings

FiVo21:01:29

You can also do (.read *in*) but in both cases you also need to press enter.

kingcode21:01:47

@finn.volkel (read-line) works ..but I am wondering what it does to work smoothly as opposed to trying to implement a ’read-char…

FiVo21:01:16

I am having a project (think git) where the the .dir-locals.el is not sitting at the root. I am starting emacs from the dir that contains .dir-locals.el but normal jack-in does not seem to pick it up. I checked default-directory is set to the dir that contains .dir-locals.el . When I do a jack in from a dired buffer that contains the .dir-locals.el everything works as expected. Where does Cider normally try to start a project from? Can this be configured ?