branch: elpa/cider
commit efb7bc9f5d061f92b71d289af537a2951d25e58f
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
Correct stale 2.0 docs
The keybinding docs still described the pre-transient world: the
jack-in chords were documented as `C-c C-x C-j C-j` etc., but `C-c C-x`
now opens the `cider-start-menu` transient, so only its suffixes (`j j`,
`c j`, ...) work. Fix that section, note that `C-c M-m` is a transient,
and add the REPL's new bindings (`C-c M-m`, `C-c C-x`, `C-c C-h`, and the
`C-x C-e` no-op).
Also fix two factual drifts: the documented `cider-repl-history-size`
default (now 5000, was 500) and a CHANGELOG entry still naming the
pre-rename `cider-use-fringe-indicators`.
---
CHANGELOG.md | 2 +-
doc/modules/ROOT/pages/keybindings.adoc | 22 ++++++++++++++++------
doc/modules/ROOT/pages/repl/configuration.adoc | 2 +-
doc/modules/ROOT/pages/repl/keybindings.adoc | 13 +++++++++++++
4 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c0fd58842..9fcad15031 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,7 +21,7 @@
- [#4044](https://github.com/clojure-emacs/cider/pull/4044): Add `cider-tap`,
a buffer that streams the values sent to `tap>` and lets you inspect Clojure
values with `RET` (reusing the inspector). ClojureScript taps stream too
([#4045](https://github.com/clojure-emacs/cider/pull/4045)) but aren't
inspectable (their value lives in the JS runtime). Requires a recent enough
`cider-nrepl` (with the `tap` middleware).
- [#4026](https://github.com/clojure-emacs/cider/pull/4026): Run ClojureScript
tests with the regular test commands (e.g. `cider-test-run-ns-tests`) when a
ClojureScript REPL is active, instead of refusing them; requires a recent
enough `cider-nrepl` (asynchronous `cljs.test/async` tests included).
- [#4023](https://github.com/clojure-emacs/cider/pull/4023):
`cider-auto-inspect-after-eval` now accepts `interactive`, `repl` or `all` (in
addition to `t`/`nil`), so a visible inspector can also be refreshed after REPL
evaluations ([#3636](https://github.com/clojure-emacs/cider/issues/3636)).
-- [#4025](https://github.com/clojure-emacs/cider/pull/4025): Mark each
`deftest` with a green (passed) or red (failed) left-fringe indicator after a
test run. `cider-use-fringe-indicators` now accepts a list of kinds (`eval`,
`test`) for finer control, in addition to `t`/`nil`
([#3721](https://github.com/clojure-emacs/cider/issues/3721)).
+- [#4025](https://github.com/clojure-emacs/cider/pull/4025): Mark each
`deftest` with a green (passed) or red (failed) left-fringe indicator after a
test run. `cider-fringe-indicators` now accepts a list of kinds (`eval`,
`test`) for finer control, in addition to `t`/`nil`
([#3721](https://github.com/clojure-emacs/cider/issues/3721)).
- [#4004](https://github.com/clojure-emacs/cider/pull/4004): Add
`cider-browse-spec-tree`, which browses a spec and the specs it references as
an expandable tree - expand a node to reveal its sub-specs (a level at a time),
`RET` to open a spec's full definition.
- [#3999](https://github.com/clojure-emacs/cider/pull/3999): Add
`cider-type-protocols` (`C-c C-w t`), listing the protocols a type implements
(the reverse of `cider-who-implements`), and `cider-protocols-with-method`
(`C-c C-w p`), listing the protocols that declare a given method.
- [#3997](https://github.com/clojure-emacs/cider/pull/3997): Add
`cider-who-implements` (`C-c C-w i`), which browses a protocol's implementing
types or a multimethod's dispatch values on an expandable tree. (Currently a
client-side approximation; inline `defrecord`/`deftype` impls and
per-`defmethod` jumps await a follow-up middleware op.)
diff --git a/doc/modules/ROOT/pages/keybindings.adoc
b/doc/modules/ROOT/pages/keybindings.adoc
index 85fd6a7bf9..28dc18fcae 100644
--- a/doc/modules/ROOT/pages/keybindings.adoc
+++ b/doc/modules/ROOT/pages/keybindings.adoc
@@ -46,22 +46,29 @@ for more.
== Starting and stopping CIDER
+kbd:[C-c C-x] opens the `cider-start-menu` transient, from which you pick how
to
+start or connect to a session. The most common entries:
+
|===
| Keyboard shortcut | Command | Description
-| kbd:[C-c C-x C-j C-j]
+| kbd:[C-c C-x j j]
| `cider-jack-in-clj`
| Start an nREPL server for the project and connect to it (Clojure).
-| kbd:[C-c C-x C-j C-s]
+| kbd:[C-c C-x j s]
| `cider-jack-in-cljs`
| Start an nREPL server and connect to it (ClojureScript).
-| kbd:[C-c C-x C-c C-j]
+| kbd:[C-c C-x j m]
+| `cider-jack-in-clj&cljs`
+| Start a server and connect both a Clojure and a ClojureScript REPL.
+
+| kbd:[C-c C-x c j]
| `cider-connect-clj`
| Connect to an already-running nREPL server (Clojure).
-| kbd:[C-c C-x C-c C-s]
+| kbd:[C-c C-x c s]
| `cider-connect-cljs`
| Connect to an already-running nREPL server (ClojureScript).
@@ -74,8 +81,8 @@ for more.
| Restart the current connection.
|===
-TIP: If you pause after the kbd:[C-c C-x] prefix, a menu pops up listing every
way
-to start or connect to a session. See xref:basics/up_and_running.adoc[Up and
Running].
+TIP: kbd:[C-c C-x] shows the whole menu (jack-in, connect, connect-sibling), so
+you don't have to memorize the suffixes. See
xref:basics/up_and_running.adoc[Up and Running].
== Evaluating code
@@ -271,6 +278,9 @@ TIP: See xref:usage/working_with_documentation.adoc[Working
with Documentation]
== Macroexpansion
+NOTE: kbd:[C-c M-m] opens the `cider-macroexpand-menu` transient; the keys
below
+are its suffixes, so kbd:[C-c M-m a] means "open the menu, then press kbd:[a]".
+
|===
| Keyboard shortcut | Command | Description
diff --git a/doc/modules/ROOT/pages/repl/configuration.adoc
b/doc/modules/ROOT/pages/repl/configuration.adoc
index 93fbbe81d6..4a647cbe09 100644
--- a/doc/modules/ROOT/pages/repl/configuration.adoc
+++ b/doc/modules/ROOT/pages/repl/configuration.adoc
@@ -346,7 +346,7 @@ reset automatically by the `track-state` middleware.
[source,lisp]
----
-(setq cider-repl-history-size 1000) ; the default is 500
+(setq cider-repl-history-size 10000) ; the default is 5000
----
* To store the REPL history of all projects in a single file:
diff --git a/doc/modules/ROOT/pages/repl/keybindings.adoc
b/doc/modules/ROOT/pages/repl/keybindings.adoc
index aacea235df..9b1973fda7 100644
--- a/doc/modules/ROOT/pages/repl/keybindings.adoc
+++ b/doc/modules/ROOT/pages/repl/keybindings.adoc
@@ -113,10 +113,23 @@ kbd:[C-c C-t C-r]
kbd:[C-c C-t C-b]
| Show the test report buffer.
+| kbd:[C-c M-m]
+| Open the macroexpansion menu (`cider-macroexpand-menu`) for the previous
form.
+
+| kbd:[C-c C-x]
+| Open the jack-in/connect menu (`cider-start-menu`).
+
+| kbd:[C-c C-h]
+| Show the REPL command reference (`cider-repl-help`).
+
| kbd:[C-c C-q]
| Quit the current nREPL connection. With a prefix argument it will quit all
connections.
|===
+NOTE: kbd:[C-x C-e] is intentionally a no-op in the REPL: there's no "evaluate
+the last sexp" there, since pressing kbd:[RET] at the prompt already evaluates
+your input.
+
TIP: There's no need to memorize this list. In any REPL buffer you'll have a
`REPL`
menu available, which lists the most important commands and their
keybindings. You can also invoke `C-h f RET cider-repl-mode` to get a list of
the