Fork me on GitHub
#cider
<
2020-03-12
>
dromar5602:03:32

Any way into tricking CIDER M-x cider-clojuredocs into thinking my clojurescript project is a clojure one?

dromar5602:03:58

cider-clojuredocs doesn't work on clojurescript, but 99% of the time I'm looking into the doc of functions common to clj and cljs anyway

ryanwatkins5404:03:49

@ak407 unfortunately for whatever reason that only works for a given *cider-error* buffer jump to source...

ryanwatkins5404:03:05

@bozhidar any ideas?

ryanwatkins5404:03:21

I tried manually setting my CLASSPATH but there's almost no documentation anywhere about exactly how to set it right, I just pointed it to where I also set cider-jdk-src-paths

ryanwatkins5404:03:33

Looking at *cider-classpath* I see /opt/icedtea-bin-3.14.0/jre/lib/somelib.jar but idk, should I be seeing some core jdk stuff or something?

ryanwatkins5404:03:37

I'm a complete java noob lol

jumar04:03:32

@ryanwatkins54 Someone shared this before but I haven't been able to make it fully work; as you said, it works (for me) only in the error buffer (stacktraces)

jumar05:03:11

This one was, in particular, for java 9+ (module system). I tried it like this:

;; customize jdk sources path
  ;; see also 
  (setq cider-jdk-src-paths '("~/workspace/clojure/clojure/clojure-1.10.1-sources"
                              "~/workspace/java/jdk-sources/jdk-14-src"
                              ;; adding most common modules, otherwise it doesn't work with modularized JDK
                              "~/workspace/java/jdk-sources/jdk-14-src/java.base"
                              "~/workspace/java/jdk-sources/jdk-14-src/java.desktop"
                              "~/workspace/java/jdk-sources/jdk-14-src/java.sql"
                              "~/workspace/java/jdk-sources/jdk-14-src/java.xml"
                              ))

ryanwatkins5404:03:43

@jumar interesting

ryanwatkins5405:03:12

@jumar I tried looking at the source code but nothing came to me as of yet, I mean it's not totally terrible but yeah

ryanwatkins5405:03:47

I saw in the talk where @bozhidar demonstrated it, he was using a macbook, maybe it's how it's distributed (the source), idk

jumar05:03:07

I'm using latest Mac OS X

jumar05:03:17

The issue can be java 9+; maybe he was using Java 8

bozhidar08:03:35

Well, Java 9 certainly created a lot of problems for us https://github.com/clojure-emacs/cider/issues/2732

bozhidar08:03:15

And you’re right - I was showing this working on Java 8. It’s still broken on 9+.

jumar05:03:30

Java interop is a big weakness of Emacs/Cider - or rather probably not a focus; Cursive is so much better in this space

bozhidar08:03:13

Yeah, unfortunately that’s a weakness currently. Mostly due to our (mine) limited bandwidth.

bozhidar08:03:45

The massive changes in Java 9 didn’t help us either - the module system made a lot of things way more complicated…

jumar20:03:45

Yeah, I can imagine that. Thanks for all the hard work anyway - I'm still a massive fun of emacs/cider. For me, more a important issue is actually a poor performance when writing a lot of stuff (especially larger data structures) in logs; e.g. logging a ring requestif If could find a solution how to significantly improve performance in that scenario. I've tried experimenting with font locking but that didn't help much; not sure if there's some other way but Emacs often blocks for quite a while when I try to print debug data. 😞

ryanwatkins5405:03:41

Cursive, hmm..

ryanwatkins5405:03:53

true @bozhidar did say this

ryanwatkins5405:03:12

I guess java interop isn't something you'd do all too often in Clojure d2d?

jumar05:03:23

Yeah, hopefully not 🙂

ryanwatkins5405:03:30

and I guess I can see javadocs anywho

ryanwatkins5405:03:00

I am steering clear of Java but who knows, maybe I will have to one day work a job in this haha

jr0cket11:03:24

The evaluation indicators in the fringe are an unobtrusive way to show if a function definition has changed or has not been evaluated.

jr0cket11:03:16

There was a PR to make these more obvious, but I think it wasn't completed.