cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
Adrian 2020-12-12T06:49:06.304200Z

Hi Clojurians!

Adrian 2020-12-12T06:49:46.304900Z

I try to use CIDER with two REPLs one for cljs and one for clj

Adrian 2020-12-12T06:50:52.305600Z

I first start the cljs one with shadow-cljs

Adrian 2020-12-12T06:52:11.305800Z

and everything is fine

Adrian 2020-12-12T06:53:08.306800Z

once I start the clj one with lein I am no longer able to evaluate expressions

dpsutton 2020-12-12T06:56:25.308700Z

a limitation of CIDER when there are two repls open is that the last repl you had highlighted needs to be the one you intend to evaluate in. So if you want to evaluate cljs code, the cljs repl needs to be the last focused repl and not the clj one. Likewise, if you want to evaluate clj code the clojure repl needs to be the last highlighted buffer. By highlighted i mean the buffer had your cursor in it more recently than the other one

Adrian 2020-12-12T06:58:05.308900Z

let me try

Adrian 2020-12-12T06:58:50.309500Z

but once the second one gets started, I loose the CIDER menu from emacs

Adrian 2020-12-12T06:59:30.309600Z

dpsutton 2020-12-12T07:00:07.310Z

i've never used those menus

Adrian 2020-12-12T07:01:03.310300Z

me neither

Adrian 2020-12-12T07:01:28.310900Z

I use them to see the available commands and the keyboard shortcuts

Adrian 2020-12-12T07:01:44.311300Z

but it is linked to the limitation you mentioned

Adrian 2020-12-12T07:01:45.311500Z

🙂

Adrian 2020-12-12T07:02:12.312100Z

thanks it was very helpful

Adrian 2020-12-12T07:03:38.312900Z

the menus an all features disappear when the wrong repl was highlighted last

Adrian 2020-12-12T07:04:00.313300Z

I expected CIDER to select the repl based on file type

Adrian 2020-12-12T07:04:35.313800Z

nevertheless is not big deal if you know about it

dpsutton 2020-12-12T07:06:28.314200Z

i agree. its kind of a complication due to some internal choices at the moment

bozhidar 2020-12-12T09:11:27.314600Z

Hmm, I'm a bit puzzled by this remark:

bozhidar 2020-12-12T09:11:39.314800Z

> a limitation of CIDER when there are two repls open is that the last repl you had highlighted needs to be the one you intend to evaluate in. So if you want to evaluate cljs code, the cljs repl needs to be the last focused repl and not the clj one.

bozhidar 2020-12-12T09:12:36.315900Z

Last time I checked if the two REPLs are the same session the evaluation commands will dispatch the evaluation to right REPL, and if there's just one REPL per session the evaluations should happen there.

bozhidar 2020-12-12T09:14:07.317Z

Normally, the most recent REPL is taken under consideration only for REPLs of the same type in the same session as then you can't easily guess which one to use.

bozhidar 2020-12-12T09:15:23.317400Z

> The current REPL is the most relevant REPL from the current session. REPL relevance is determined by the type of the current buffer. For example if the current buffer is a clj buffer then a clj REPL is selected. Ambiguous situations could arise when, for instance, there are multiple clj REPLs within a session, or the current buffer is a cljc buffer and both clj and cljs REPLs exist in the session. In such cases the current REPL is the most recently viewed REPL of the relevant type. That's from the docs.

bozhidar 2020-12-12T09:16:42.318500Z

> but once the second one gets started, I loose the CIDER menu from emacs That's weird and it should be happening. Can you please file a ticket with the exact steps you're taking to start the two REPLs so I can check what's going on when I can.