Fork me on GitHub
#lsp
<
2022-01-09
>
pinkfrog11:01:51

Not directly related to LSP, but how can I instruct deps.edn to download java sources so that I can perform jump to definition?

practicalli-johnny12:01:19

If your talking about the Java JDK source, I download that via my operating system (Ubuntu package) and have a :lib/java17-source alias in my user wide deps.edn to include the .zip archive of the source in the classpath when starting a REPL https://github.com/practicalli/clojure-deps-edn#java-sources

pinkfrog12:01:28

Thanks. What about other 3rd part jars? Possible to automatically download the sources? I am aware intellj can do that.

ericdallo14:01:50

Unfortunately, we don't have find to definition for java classes on clojure-lsl yet, we would need to make some changes on clj-kondo probably. Meanwhile you need the repl to find definition of those

pinkfrog14:01:55

How to perform that through the repl?

ericdallo14:01:25

I think calva does that automatically when you connect the repl

pinkfrog15:01:44

I guess the first step is to download the jar sources.

ericdallo15:01:27

when you jack in the repl it already download jars which contains the source, right?

pinkfrog15:01:28

I feel the JAVA jars only contain .class files, not java files.

ericdallo16:01:59

AFAIK most java jars have the sources by default unless you tell it remove it