Fork me on GitHub
#cider
<
2017-06-27
>
luchini00:06:28

Probably a very stupid question but what’s the basic difference between cider-jack-in and cider-jack-in-clojurescript?

richiardiandrea01:06:54

@luchini the latter creates two buffers , one for clj and one for cljs

stardiviner06:06:24

Why CIDER does not complete .getCanonicalPath?

stardiviner07:06:54

Which is a method from object java.io.File that created by .

jumar07:06:52

@stardiviner because it's a java method, not clojure function. You'd have to introspect the object on which that method is invoked.

stardiviner07:06:21

I see, is it possible to make cider-doc related functions work on .getCanonicalPath?

jumar07:06:37

I'm not sure, but I'd say no - everything works on static methods (like java.io.File/createTempFile), but in case of instance methods it's probably the same problem as with autocomplete

jumar07:06:40

That's said, it seems to work in many cases, especially classes from java.lang package, e.g. .toUpperCase

jumar07:06:59

This is the best source I could find: https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/util/java.clj#L263 resolve-symbol and resolve-member (in case of instance method) in cider-nrepl are used for getting the list of candidates.

jumar08:06:46

and looking at the source it seems that it scans java classes imported in current namespace - you can try

(doseq [[name fq-name] (ns-imports *ns*)] (println fq-name))
If you import File:
(import java.io.File)
Then you should be able to get autocomplete and documentation work on .getCanonicalPath. It's not a smooth experience, however.

stardiviner09:06:35

@jumar I see, thanks for your explain, very detailed.

jumar14:06:06

Already asked in #spacemacs but trying here too: Is there any good way to search for a string in all jars/libraries (or at least in given jar/library) on the classpath ?

jumar14:06:11

The best thing I've found so far is to invoke cider-classpath, look for interesting jars and then do zipgrep "search-string" library.jar in eshell

pandeiro17:06:04

@jumar That would be an awesome feature to add to cider IMO

pandeiro17:06:46

One very hacky way I've accomplished something similar is to specify a project-local .m2 cache and then use projectile to grep for something

pandeiro17:06:03

From the results, I'm pretty sure it is able to search within the jar files