You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/modules/ROOT/pages/usage/working_with_documentation.adoc
+36-8Lines changed: 36 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -15,21 +15,49 @@ TIP: You can also use the keybinding kbd:[C-c C-d d]. Most CIDER keymaps
15
15
provide two versions of the same keybinding (with or without the final `Control`),
16
16
as some people prefer to keep holding `Control` and some don't.
17
17
18
-
Normally the command operates on the symbol at point. If invoked with a prefix argument, or no symbol is found at point, it will prompt for a symbol.
18
+
Normally the command operates on the symbol at point. If invoked with a prefix
19
+
argument, or no symbol is found at point, it will prompt for a symbol.
19
20
20
21
== Local JavaDoc
21
22
22
-
Most JDK distributions ship with a `src.zip` file (an archive with all base Java source files). If you have such archive present in your JDK, CIDER will automatically parse the source file when you query the documentation for a Java class (e.g. `java.lang.Thread`) or a method (e.g. `java.lang.Thread/currentThread`) and will display the properly formatted JavaDoc in the documentation buffer. You will also see better Eldoc documentation (minibuffer hints) for Java methods. If the source file are present, you are able to jump to class or method definition by pressing kbd:[M-.] on the class name or method name.
23
+
Most JDK distributions ship with a `src.zip` file (an archive with all base Java
24
+
source files). If you have such archive present in your JDK, CIDER will
25
+
automatically parse the source file when you query the documentation for a Java
26
+
class (e.g. `java.lang.Thread`) or a method
27
+
(e.g. `java.lang.Thread/currentThread`) and will display the properly formatted
28
+
JavaDoc in the documentation buffer. You will also see better Eldoc
29
+
documentation (minibuffer hints) for Java methods. If the source file are
30
+
present, you are able to jump to class or method definition by pressing
31
+
kbd:[M-.] on the class name or method name.
23
32
24
-
Furthermore, CIDER is able to parse JavaDoc source files and jump to definitions for third-party Java libraries if you have downloaded the special `-sources.jar` file for that library. See the next section on how to download source JARs.
33
+
Furthermore, CIDER is able to parse JavaDoc source files and jump to definitions
34
+
for third-party Java libraries if you have downloaded the special `-sources.jar`
35
+
file for that library. See the next section on how to download source JARs.
25
36
26
37
== Obtaining source JARs
27
38
28
-
Since version 1.17, CIDER is able to download the necessary source JAR file automatically when you either request the documentation for a Java class/method or when you jump to the definition of a Java class/method. In order for the sources to be downloaded, the variable `cider-download-java-sources` has to be enabled (it is by default). When the download triggers, CIDER displays a minibuffer message about that. Fetching a single source JAR usually takes a few seconds. CIDER will make only one attempt to download the source JAR for a particular dependency per process — if it failed to download (usually, because the dependency doesn't have a source JAR published to Maven), CIDER will not retry that until the next restart.
29
-
30
-
NOTE: While Eldoc functionality benefits from having Java sources, the eldoc itself will not trigger the downloading of Java source JARs. You will have to lookup the documentation once manually or jump to the definition in order for the JAR is downloaded. After that, Eldoc will pick up the Java sources and display better hints.
31
-
32
-
Alternatively, you can use https://github.com/clojure-emacs/enrich-classpath[`enrich-classpath`] to download all source JARs used by your current project at once. This will incur longer startup time, but will not trigger individual JARs fetching at the runtime.
39
+
Since version 1.17, CIDER is able to download the necessary source JAR file
40
+
automatically when you either request the documentation for a Java class/method
41
+
or when you jump to the definition of a Java class/method. In order for the
42
+
sources to be downloaded, the variable `cider-download-java-sources` has to be
43
+
enabled (it is by default). When the download triggers, CIDER displays a
44
+
minibuffer message about that. Fetching a single source JAR usually takes a few
45
+
seconds. CIDER will make only one attempt to download the source JAR for a
46
+
particular dependency per process — if it failed to download (usually, because
47
+
the dependency doesn't have a source JAR published to Maven), CIDER will not
48
+
retry that until the next restart.
49
+
50
+
NOTE: While Eldoc functionality benefits from having Java sources, the eldoc
51
+
itself will not trigger the downloading of Java source JARs. You will have to
52
+
lookup the documentation once manually or jump to the definition in order for
53
+
the JAR is downloaded. After that, Eldoc will pick up the Java sources and
54
+
display better hints.
55
+
56
+
Alternatively, you can use
57
+
https://github.com/clojure-emacs/enrich-classpath[`enrich-classpath`] to
58
+
download all source JARs used by your current project at once. This will incur
59
+
longer startup time, but will not trigger individual JARs fetching at the
0 commit comments