Thank you for fixing!
@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.
@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.
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!
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.
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?
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.
If you maximize the Emacs frame the REPL should appear on the right.
it is maximized, and is appearing at the bottom
AFAIK it depends on the value of display-buffer-alist
dont know what that means, sorry
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?
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
it means you can configure that value. Try running M-x counsel-describe-value
to query the setting
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.
It does this even now, it’s just very few people realize they need to fetch the source jars.
More details from a recent conversation on how to simplify this - https://github.com/clojure-emacs/orchard/issues/113
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.
That’s our Java source parser https://github.com/clojure-emacs/orchard/blob/master/src/orchard/java/parser.clj 🙂
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.
yep, for sure :)
yes that level works. i meant navigating after you've hit your first java source
And renaming Java elements from Clojure source and vice versa, and doing the same from Scala & Kotlin, etc etc… 🙂