Skip to content

Commit 581471a

Browse files
committed
Update the eldoc instructions
1 parent e178e7f commit 581471a

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

doc/configuration/eldoc.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
# ElDoc
22

3-
## Configuring eldoc
3+
Eldoc is a buffer-local minor mode that helps with looking up Lisp
4+
documentation. When it is enabled, the echo area displays some useful
5+
information whenever there is a Lisp function or variable at point;
6+
for a function, it shows the argument list, and for a variable it
7+
shows the first line of the variable's documentation string.
48

5-
* Enable `eldoc` in Clojure buffers:
6-
7-
```el
8-
(add-hook 'cider-mode-hook #'eldoc-mode)
9-
```
9+
CIDER provides a Clojure backend for ElDoc that works out-of-the box, as
10+
long as `eldoc-mode` is enabled.
1011

1112
![Eldoc](../images/eldoc.png)
1213

14+
## Enabling ElDoc
15+
16+
`global-eldoc-mode` is enabled by default in Emacs 25.1, so you don't really have
17+
to do anything to enable it.
18+
19+
It will in both source and REPL buffers.
20+
21+
## Configuring ElDoc
22+
1323
* CIDER also would show the eldoc for the symbol at point. So in `(map inc ...)`
1424
when the cursor is over `inc` its eldoc would be displayed. You can turn off this
1525
behaviour by:

doc/repl/configuration.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ REPL buffer in the current window:
2727
(setq cider-repl-display-in-current-window t)
2828
```
2929

30-
## Eldoc
31-
32-
Eldoc displays function signatures in the minibuffer as you're typing.
33-
It's extremely useful! Enable `eldoc` in REPL buffers like this:
34-
35-
```el
36-
(add-hook 'cider-repl-mode-hook #'eldoc-mode)
37-
```
38-
3930
## Customizing the REPL prompt
4031

4132
You can customize the REPL buffer prompt by setting

0 commit comments

Comments
 (0)