cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
richiardiandrea 2021-04-14T04:41:09.268400Z

Thank you for fixing!

bozhidar 2021-04-14T05:38:55.268800Z

@qythium @vemv One more thing to consider in case you want to hack on refactor-nrepl and clj-refactor - a while ago we’ve decided to move the most useful parts of both of them that are not tied to the analyzer to clojure-mode/CIDER to simplify the maintenance and the setup. We didn’t do much on the front - basically our biggest achievement was move a bunch of simple refactoring functions to clojure-mode, but I hope we’ll revisit this down the road.

👍 2
bozhidar 2021-04-14T05:44:21.270500Z

@horton.wh.dev You’re on the right track - indeed nREPL supports loading middleware dynamically, but this functionality hasn’t been implemented in CIDER yet. The idea was for this to replace cider-jack-in, as with the dynamic loader you can bundle some middleware with the editor that it can load after connecting.

Rusty Shackleford 2021-04-14T22:35:46.275Z

Thanks, I got it working by updating the project's deps and manually adding the cider middleware where the repl is started, but good to know I wasn't totally off base. Would be a cool feature to have eventually!

bozhidar 2021-04-14T05:45:36.271400Z

Btw, even with the warning you’re seeing the basic CIDER features will work, especially you’re using nREPL 0.8. Depends on how much you need I guess.

Steven Katz 2021-04-14T18:43:08.272Z

Hi, im new to emacs…cider seems to be starting in a window at the bottom of emacs, it used to start to the right…any idea what changed and how I can change it back?

bozhidar 2021-04-14T19:44:39.273Z

The position by default depends on the size of the Emacs window. There’s some config to force where the REPL buffer should appear, but I can’t remember it off the top of my head.

bozhidar 2021-04-14T19:45:27.273600Z

If you maximize the Emacs frame the REPL should appear on the right.

Steven Katz 2021-04-14T20:02:20.273900Z

it is maximized, and is appearing at the bottom

Zoltan Kalmar 2021-04-14T20:57:57.274600Z

AFAIK it depends on the value of display-buffer-alist

Steven Katz 2021-04-14T21:41:53.274900Z

dont know what that means, sorry

jmckitrick 2021-04-14T23:23:21.276400Z

I’m having a friendly debate with my boss at work 🙂 He’s showing me how IntelliJ/Cursive jumps into Java code in jaxson from the Clojure library wrapping it. I’m sure I can do that with Cider, I just don’t know how. Any tips or tricks?

dpsutton 2021-04-14T23:24:51.277300Z

i believe there are ways to go one level in if the sources are on the classpath, perhaps some other setting as well. But once there you won't have navigation. interop with java is where Cursive will absolutely shine

grazfather 2021-04-14T23:33:20.278800Z

it means you can configure that value. Try running M-x counsel-describe-value to query the setting

alexmiller 2021-04-14T23:37:39.281600Z

there is conceptually no reason Cider could not match this level of support. all Maven artifacts published on Maven central (most of the Java libs you'd usually use) also are required to publish -source jars during publishing. So given a Maven library com.fasterxml.jackson.core/jackson-core 2.12.3, you can find the sources under the same GAV with the classifier "sources" (you can see this here https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.12.3/). IntelliJ/Cursive will ask you if you want to download the sources the first time you try to nav into it and it can't find them. afaik, it just downloads that sources jar and takes you to the java inside it.

👍 1
bozhidar 2021-04-15T07:28:29.297500Z

It does this even now, it’s just very few people realize they need to fetch the source jars.

bozhidar 2021-04-15T07:29:06.297700Z

More details from a recent conversation on how to simplify this - https://github.com/clojure-emacs/orchard/issues/113

cfleming 2021-04-14T23:43:52.282600Z

There’s a lot more than just downloading the sources though. You have to then index them so that you know where in the source the semantic elements are.

bozhidar 2021-04-15T09:06:06.298200Z

That’s our Java source parser https://github.com/clojure-emacs/orchard/blob/master/src/orchard/java/parser.clj 🙂

cfleming 2021-04-14T23:44:28.283400Z

So there’s conceptually no reason it couldn’t be made to work given that elisp is turing complete, but it’s probably a decent amount of work.

alexmiller 2021-04-14T23:45:16.283700Z

yep, for sure :)

dpsutton 2021-04-14T23:54:52.284100Z

yes that level works. i meant navigating after you've hit your first java source

cfleming 2021-04-14T23:55:40.285Z

And renaming Java elements from Clojure source and vice versa, and doing the same from Scala & Kotlin, etc etc… 🙂