Fork me on GitHub

@ryanwatkins54 I needed to set cider-jdk-src-paths for it to work


As long as some Java sources are on your classpath the code lookup should work.


I have gotten Drawbridge integrated into my app 🎉 ... and now I am wondering whether it's possible to get CIDER to connect to that.


Looks like the relevant issue in the issue tracker is this one: currently closed as of 2014, last updated in 2017, so I guess the answer is "not without some work."


The last comment in the thread there talks about something called Lein Catapult which seems like in principle it could be used


It has one commit from six years ago, but hey, it's worth a try!


Didn't work out of the box, but maybe it won't be too hard to debug.


However, that bug doesn't seem to matter, since if I rerun lein catapult :[email protected]:8080/repl I get a message that I am connected to Drawbridge!


I've created a fork with modern dependencies [com.github.holtzermann17/lein-catapult "4fa2f909f334d2094b2885567f0f036da3518820"] via Jitpack, but I don't think this matters at the moment.


OK, but now, trying to connect with CIDER I get the following print out:


$ lein catapult :[email protected]:8080/repl
:repositories detected in user-level profiles! [:user] 
Retrieving com/github/holtzermann17/lein-catapult/4fa2f909f334d2094b2885567f0f036da3518820/lein-catapult-4fa2f909f334d2094b2885567f0f036da3518820.pom from jitpack
Listening on port  33853 ; connected to Drawbridge.
nREPL connection accepted.
>>> {:op clone, :id 388}
>>> {:op clone, :id 389}
>>> {:op describe, :session ba6f45c9-8bc1-4e9b-8bf6-85c51fa10aec, :id 390}
<<< {:id 390, :session ba6f45c9-8bc1-4e9b-8bf6-85c51fa10aec, :aux {:current-ns user}, :ops {:describe {}, :eval {}, :load-file {}, :stdin {}, :clone {}, :interrupt {}, :close {}, :ls-sessions {}}, :versions {:nrepl {:major 0, :minor 6, :incremental 0, :version-string 0.6.0}, :clojure {:major 1, :minor 10, :incremental 0, :version-string 1.10.0}, :java {:major 11, :minor 0, :incremental 6, :version-string 11.0.6}}, :status [done]}
>>> {:file *cider-repl system-test/exchange:localhost:33853(clj)*, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :op eval, :column 1, :line 1002, :id 391, :code (clojure.core/apply clojure.core/require clojure.main/repl-requires), :content-type true, :inhibit-cider-middleware true, :nrepl.middleware.print/stream? 1, :nrepl.middleware.print/options {:right-margin 70}, :session ba6f45c9-8bc1-4e9b-8bf6-85c51fa10aec}


CIDER still shows the loading symbols [=== ] [====] [ ===] [ ==] etc., and I don't get a prompt. However the cider-repl buffer does say this at the top:

;; Connected to nREPL server - 
;; CIDER 0.24.0 (package: 20200215.223) (India), nREPL 0.6.0


I updated CIDER issue with this information. It looks like it is pretty close to working...


Ah, here's an error message printed out by my app:


Exception in thread "nRepl-session-ba6f45c9-8bc1-4e9b-8bf6-85c51fa10aec" java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Character (java.lang.String and java.lang.Character are in module java.base of loader 'bootstrap')


Woah, I also see that despite being very slow more things are happening on the lein catapult repl if I leave if for a while.

>>> {:op eval, :code (seq (.split (System/getProperty "java.class.path") ":")), :session a7a5cfcd-d460-4924-9b8d-b4aa6eef7607, :id 6}
Followed by a big list with all of the dependencies in the app!
{:id 6, :session a7a5cfcd-d460-4924-9b8d-b4aa6eef7607, :ns user, :value ("/home/joe/system-test/exchange/test" "/home/joe/system-test/exchange/test/clj" "/home/joe/system-test/exchange/src/clj" ...  "/usr/local/lib/m2/viebel/codox-klipse-theme/0.0.1/codox-klipse-theme-0.0.1.jar")}


is there a way to have the *cider-result* buffer print newlines instead of the literal \n , inside an EDN output?


Somehow for some reason eldoc tips not showing up for me anymore. cider-eldoc-display-for-symbol-at-point and cider-eldoc-display-context-dependent-info are set to t. I have global-eldoc-mode enabled, but whenever I try to run M-x eldoc-mode it says: “There is no ElDoc support in this buffer”. Can someone help me to investigate why it’s not working?


Are you running a custom built emacs? 27 or 28?


Ah… this is what I’m seeing: CIDER sets eldoc-documentation-function but eldoc-documentation-functions is nil, that prevents eldoc from enabling the mode in the buffer


@dpsutton yes I’m running 28, because I want jansson support


Well it sounds like you’re on your way. I think I heard this api changed in 28


> Well it sounds like you’re on your way Not really. I’m still not sure how to fix this


Nevermind. Fixed it by doing (add-hook 'eldoc-documentation-functions #'cider-doc nil t)