Javadoc - Java API documentationλ︎
, h j shows javadoc information for a Java method or class, opening the relevant page on the Oracle website for Java.
Include Java Sourcesλ︎
Include the Java JDK sources when starting the REPL, to be able to navigate to the source definitions of Java methods.
Download the Java JDK sources or install via the operating system package manager, e.g.
sudo apt install openjdk-17-source
Use an alias that adds the sources as an
:extra-deps via a
:src/java17 alias includes the sources for Java 17 on the classpath, making them available for the Cider
The alias assumes the sources are located at
clojure -M:src/java17:repl/rebel starts a rich terminal UI REPL including the Java sources on the class path.
Navigate Java Source codeλ︎
, g g to run the command
clj-find-var which shows
Clojure LSP hijacks the
, g gkey binding, so use
SPC SPC clj-find-varinstead.
Selecting a specific Java package (namespace) will open the Java source code in a buffer
Clojure LSP Java Sourcesλ︎
:source-aliases key in the Clojure LSP configuration can be used to add Java JDK sources to the Clojure LSP class path.
An alias in the project
deps.edn can be used to include the Java JDK sources
Clojure LSP currently doesn't use the user level
deps.ednfile, so the alias must be in the project