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
#4048: Each command group now opens a transient menu instead of a bare prefix keymap (cider-eval-menu at C-c C-v, cider-doc-menu at C-c C-d, and likewise for test, ns, insert, macroexpand, profile, trace and references), plus a top-level cider-menu dispatch; existing keybindings are preserved.
#4061: The jack-in/connect keybindings are a transient menu too (cider-start-menu, C-c C-x), with flags for aliases (-a), the ClojureScript REPL type (-l) and editing the command before running (-e) (#3317).
Add a transient menu to the debugger (cider-debug-menu, ? during a debug session) - its single-key commands are proper named commands now (e.g. cider-debug-next), so M-x works too - and to the inspector (cider-inspector-menu, m).
Add per-invocation flags to several menus: the printer (--print-fn=) in the pretty-print menu (#4065), test selectors (--include=/--exclude=) in the test menu (#4063), refresh modes (--all/--clear/--inhibit-fns) in the ns menu and expansion display (--ns=/--meta) in the macroexpand menu (#4062).
Rich content in evaluation results:
#2476: Interactive evaluations now honor content types too: a result carrying rich content (e.g. an image) renders per the new cider-eval-rich-content-destination - inline (the default, in the result overlay at point), repl, popup or nil (plain values, the previous behavior).
Render fetched text/html content as formatted text (via shr), and make an external-content result's URL a clickable link; remote images inside that HTML are never fetched, so rendering a result never makes a network request on its own.
New code-exploration commands under C-c C-w, presented as expandable trees:
#3995: cider-who-calls (c) and cider-who-is-called (d), SLIME-style browsers for a function's callers and callees.
#3997, #3998, #4000, #4001: cider-who-implements (i), browsing a protocol's implementing types (inline defrecord/deftype included) or a multimethod's dispatch values, with jumps to each implementation's source.
#3999: cider-type-protocols (t), listing the protocols a type implements, and cider-protocols-with-method (p), listing the protocols that declare a given method.
#3996: cider-who-macroexpands (m), finding a macro's use sites by searching the project's source.
#3994: xref-find-references (M-?) now finds references by searching the project's source files, covering code that hasn't been loaded into the REPL yet (configurable via cider-xref-references-mode).
Tracing and enlighten:
#3990, #3992, #3993: Add cider-trace, a dedicated buffer that streams the calls and return values of traced functions live (instead of interleaving them into the REPL), with foldable calls, n/p navigation and jump-to-definition.
#3989: Add cider-list-traced to show what's currently traced and cider-untrace-all to clear all tracing at once.
#3988, #3991: Add cider-enlighten-defun-at-point (enlighten a single form without the global mode), cider-enlighten-clear and cider-enlighten-stop (turn enlightenment off at once).
Inline macro stepping (#3970, #3976, #3977, #3978, #3985): add cider-macrostep-expand (cider-macrostep-mode), expanding macros in place step by step, with the further-expandable sub-forms highlighted, gensyms colorized, full expansion in one step (a) and a popup-buffer variant (cider-macrostep-expand-in-buffer).
Eval-to-comment improvements:
#3965: Add cider-send-to-comment (C-c C-j c), copying the form at point into the namespace's rich comment block, and cider-jump-to-comment (C-c C-j v) to visit it.
#3964: Add cider-comment-style (line, discard or comment) to control how the inserted results are formatted.
#4018: Successive eval-to-comment calls now update the inserted result in place instead of stacking stale ones.
#4044, #4045: Add cider-tap, a buffer that streams the values sent to tap> and lets you inspect them with RET (ClojureScript taps stream too, but aren't inspectable).
#4094: Add cider-doctor, which checks your Emacs setup (and the active nREPL session, if any) for common problems and shows a copy-pasteable report.
Add an orchard value for cider-print-fn, selecting cider-nrepl's orchard.pp-backed pretty-printer - significantly faster than the default clojure.pprint and it doesn't realize lazy seqs while printing.
#4108: C-c C-d at the stdin prompt sends end-of-input, so code reading to EOF can be satisfied interactively instead of only by interrupting the evaluation.
#4026: Run ClojureScript tests (asynchronous ones included) with the regular test commands when a ClojureScript REPL is active, instead of refusing them.
#4025: Mark each deftest with a green (passed) or red (failed) fringe indicator after a test run; cider-fringe-indicators now also accepts a list of kinds (eval, test) (#3721).
#3973, #3980: Indicate namespace load-state: a mode-line (and optional fringe) marker when the buffer's namespace isn't loaded into the REPL or is stale (cider-ns-load-state-display), and per-form fringe markers that turn amber when an evaluated form is edited (cider-mark-stale-after-edit); the load, reload and refresh commands all keep them in sync.
#4023: cider-auto-inspect-after-eval now accepts interactive, repl or all, so a visible inspector can also be refreshed after REPL evaluations (#3636).
#4057: Show an animated spinner overlay at the form being evaluated instead of the mode-line spinner, when result overlays are enabled (#3516).
#4060: Hint at jack-in time when no Clojure CLI aliases are set, so newcomers discover aliases like :dev/:test; set cider-clojure-cli-aliases to :nil-no-warn to silence it (#3317).
#4055: Add cider-clojure-cli-powershell-options to pass extra options to the PowerShell executable used for jack-in on Windows (#2879).
#4004: Add cider-browse-spec-tree, which browses a spec and the specs it references as an expandable tree.
#3969: Show ClojureDocs examples inline in the *cider-doc* buffer (e to toggle, cider-doc-show-clojuredocs-examples to always show them).
#3963: Attach cider-scratch buffers to a specific session (one scratchpad per session), with a configurable eval destination.
#3966: Add cider-set-eval-destination and cider-cycle-eval-destination (C-c C-M-d) to override, per buffer, which REPL type evaluations dispatch to.
Bugs fixed
#4107: Route stdin input (and a cancel's interrupt) to the exact connection that requested it, so reads no longer misroute when several connections are active.
#4106: Cancelling a stdin prompt now interrupts the evaluation, instead of sending a value nREPL treated as EOF and letting the evaluation continue.
#4093: Fix a crash (wrong-type-argument stringp nil) when a REPL result is truncated by the print middleware.
#4089: Fix cider-macroexpand-undo failing with a read-only error in the macroexpansion buffer.
#4085: Resolve unqualified ClojureScript core vars (e.g. their indentation metadata) against cljs.core in a cljs REPL, and make a prefix argument to cider-find-keyword invert cider-prompt-for-symbol like the sibling find commands.
#4084: A batch of nREPL-layer fixes: nrepl-dict-merge no longer mutates a shared literal when its first argument is nil, nrepl-notify no longer treats a notification's text as a format string, sync-request callbacks are reaped on abort-on-input/timeout exits (fixing a slow memory leak on the eldoc/completion path), cider-find-keyword errors cleanly when there is no keyword at point, and a missing server-side log appender is recreated after a REPL restart.
#4083: Split the classpath on the platform path separator (fixing cider-classpath on Windows), stop cider-format-region/cider-format-defun from corrupting multi-line string and regex literals when the region starts at a non-zero column, make cider-profile-toggle honor its prefix argument, and signal a clear error when cider-apropos is used in a ClojureScript context.
#4082: Render a stack frame's ns/fn when it carries them (e.g. ClojureScript frames) instead of degrading to nil/nil (#4043).
#4081: Make cider-stacktrace-suppressed-errors customizable again and stop the stacktrace renderer from leaving a stray fill-prefix in the *cider-error* buffer.
#4078: Fix the menu-bar showing a duplicated "CIDER" menu when cider-mode is active.
Debugger fixes: the O (force step-out) key no longer aborts the session with an error, and the menu-bar menu advertises the right key for "Inject value" plus the missing stepping/stacktrace/trace entries.
Fix cider-log-kill-appender's confirmation message, which had the appender and framework names swapped.
#4066: Jump to the actual source when clicking a stack frame for a top-level anonymous function (the deftest shape), instead of landing in clojure.core/fn (#3157).
#4058: Signal a helpful error when cider-javadoc gets an unresolvable Javadoc URL from the middleware, instead of silently doing nothing (#2969).
#4054: Interrupt every REPL an evaluation was dispatched to - in a .cljc buffer cider-interrupt previously interrupted only one of the two (#4036).
#4053: Restore point to the place a debug session was started from when quitting with q (#1595).
#4049: Font-lock streamed REPL results as a whole instead of per chunk, so values split across chunks are highlighted correctly (nREPL #445).
#4038: SSH tunneling now forwards a free local port (with readiness detected by probing it, bounded by the new nrepl-ssh-tunnel-timeout), so remote REPLs sharing a port no longer collide on localhost (#3730, #3561, #3085).
#4026: cider-macroexpand-1 and friends now work in ClojureScript for user-defined macros (#2099).
#4016: Show the REPL prompt right away when a server (e.g. jank) sends value and ("done") in the same response (#3869).
#4019: Stop the local-variable font-locking from mistaking a def's value for an arglist (cider-locals false positives) (#3657).
#4021: Stop unbalanced parentheses in REPL output from breaking sexp navigation and paredit in the REPL buffer (#3102).
#4020: Show an error instead of failing silently when an interactive evaluation command is used with no REPL connected (#3028).
#4006: Fix a doubled colon in the jack-in command when both cider-clojure-cli-global-aliases and cider-clojure-cli-aliases are set in the documented :foo:bar form.
#3971: Fix cider-macroexpand-again (g in the macroexpansion buffer) to actually re-expand the form instead of redisplaying the original input.
#3986: Signal a user-error when a var to trace isn't found or isn't traceable, so the failure no longer triggers a backtrace under debug-on-error.
#4018: Fix interleaving of value and stderr output in cider-eval-pprint-with-multiline-comment-handler.
Changes
#4002, #4050: Bump the injected cider-nrepl from 0.59.0 to 0.62.1 (and piggieback to 0.7.0); besides backing many of the features above, the new middleware honors the project's cljfmt configuration when formatting and carries a batch of debugger fixes.
Enable rich content in the REPL by default (cider-repl-use-content-types is now t): image results render inline, and external content (files, URLs) renders a [show content] button that fetches only on demand - the automatic fetching that got the feature disabled back in 0.25 (#2825) is gone, and the server side is hardened in cider-nrepl 0.62.
#4092, #4093: Clean up the REPL's keybindings: the source-buffer eval keys no longer run the source-buffer eval path there (C-x C-e is a no-op at the REPL; evaluate at the prompt instead), C-c M-m now opens the macroexpand menu (matching cider-mode), and C-c C-r no longer injects clojure-mode's source-editing refactor map.
Renames and consolidations (in all cases the old names keep working as obsolete aliases):
#4052: The inline evaluation-result options become a consistent cider-eval-result-* family: cider-use-overlays -> cider-eval-result-display, cider-result-overlay-position -> cider-eval-result-position, cider-result-use-clojure-font-lock/cider-overlays-use-font-lock -> cider-eval-result-font-lock, cider-interactive-eval-output-destination -> cider-eval-output-destination, and cider-use-fringe-indicators -> cider-fringe-indicators.
Consolidate the per-buffer auto-select options (cider-auto-select-error-buffer and friends) into a single cider-auto-select-buffer, which can be t, nil or a list of the popup buffers to select (e.g. '(error inspector)).
Rename the REPL history browser from cider-repl-history to cider-history (command, mode and options), so its names no longer clash with the REPL's unrelated input-history settings.
Rename cider-log-buffer-clear-p to cider-log-buffer-has-content-p - the old name read as the opposite of its behavior.
#4035: Rename cider-ensure-connected to cider-ensure-session.
#4033: Deprecate the legacy connection-named aliases (cider-current-connection, cider-connections, cider-map-connections, cider-connection-type-for-buffer) in favor of their cider-repl counterparts.
#4029: Deprecate the positional request APIs in favor of their keyword-argument counterparts (cider-nrepl-send-sync-request -> cider-nrepl-sync-request, cider-nrepl-request:eval -> cider-nrepl-send-eval-request, and the nrepl- equivalents).
#4028: Deprecate cider-ensure-op-supported; op support is now enforced automatically by the nREPL senders.
#4081: Remove the long-obsolete (no-op since 1.18) cider-stacktrace-analyze-at-point and cider-stacktrace-analyze-in-region commands.
Quieter REPL startup (#3983, #3984): the long welcome banner and the echoed jack-in command/ClojureScript init form are gone, replaced by a one-line hint; the details are available on demand via cider-repl-help (C-c C-h, or the ,refcard REPL shortcut) and cider-repl-describe-startup (,startup).
#3982: Warn (once per session) when a deprecated CIDER keybinding is used, starting with the REPL-only jack-in/connect keys superseded back in 0.18; see cider-warn-on-deprecated-keybindings and M-x cider-list-deprecated-keybindings.
Bump the default cider-repl-history-size from 500 to 5000.
Color the nREPL messages buffer with customizable faces (nrepl-message-faces, with light- and dark-background variants) instead of a hardcoded color list; nrepl-message-colors is now obsolete, but still takes precedence when customized.
#4059: Use the public sesman-sessions (via cider-sessions) instead of a private sesman function in cider-debug-sesman-friendly-session-p (#4037).
#4056: Show the interactive-evaluation spinner in the buffer you evaluated from, instead of always in the REPL buffer (#3516).
#4047: Render the doc buffer's "See also" section as a bulleted list, matching the ClojureDocs buffer.
#4046: Make eldoc asynchronous - the arglist/var lookup no longer blocks Emacs as you move the cursor - and decline the eldoc slot when CIDER has nothing, so other sources (e.g. clojure-lsp) compose cleanly.
#4026: Show a clear message when a Clojure-only operation (apropos, xref, trace, profile, refresh, reload, undef, spec) is invoked under a ClojureScript REPL, instead of failing confusingly (#2198).
#4022: cider-inspect-last-sexp now inspects the tagged class when point is on a type tag (e.g. ^String) (#3679).
#4024: The *cider-ns-refresh-log* buffer now supports r/g/C-c M-n r to re-run the refresh from within it (#2798).
#4005: Render the namespace browser (cider-browse-ns) on the cider-tree-view widget: groups are foldable with TAB, and n/p move between entries.
#4003: Turn C-c M-m into a prefix map (cider-macroexpand-map) grouping all the macro-expanding commands; cider-macroexpand-all thus moves from C-c M-m to C-c M-m a, while C-c C-m still runs macroexpand-1 directly.
Macroexpansion buffer polish (#3971, #3972): n/t cycle namespace display and toggle metadata in place, a header line shows the active expander and options, expansions briefly pulse, and expanding a special form, non-macro or unresolved symbol reports a helpful message instead of silently doing nothing.
#3979: Give cider-find-var, cider-doc, the ClojureDocs commands and the xref/browse-ns commands actionable resolution hints, telling an unloaded namespace (evaluate the buffer first) apart from a genuinely unresolved symbol.
Cheatsheet refresh (#3967, #3968): add the functions introduced since Clojure 1.11, a dedicated cider-cheatsheet-mode with fontified section headers and TAB/S-TAB navigation, and a menu plus per-var keys for docs and ClojureDocs.