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
REPL v2: multi-line input, history persistence, ns-aware prompt
Three improvements that bring the REPL up to what a daily user expects:
1. Multi-line input. RET now goes through neat-repl-return, which
checks the pending input's balance via parse-partial-sexp under
neat-repl-input-syntax-table (Emacs Lisp by default). Balanced ->
submit; not balanced or in-string -> newline. The user can finish a
sexp across as many lines as needed and only the last RET submits.
2. History persistence. neat-repl-history-file defaults to
~/.emacs.d/neat-repl-history; comint-input-ring-file-name and
comint-input-ring-size are wired in on mode setup, and the
kill-buffer hook now writes the ring out before the buffer dies.
3. Namespace-aware prompt. neat-repl-prompt-format (default '%s> ')
plus a buffer-local neat-repl--current-ns. Every response carrying
an 'ns' field bumps the slot, and the next prompt picks it up.
So 'user> (in-ns 'myapp.core)' yields a 'myapp.core> ' prompt next.
neat-repl-default-ns is what shows up before the server has had a
chance to tell us anything.
Replaces the old neat-repl-prompt defcustom -- no released versions
to keep compatible with.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,3 +20,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
20
20
-`.nrepl-port` discovery: `M-x neat` defaults the port to whatever the nearest port file contains, so in a project with a running server `M-x neat RET RET` is enough. Customize via `neat-port-file-name`; library entry points are `neat-discover-port` and `neat-discover-port-file`.
21
21
- Multi-connection support: `neat-connections` tracks every live `neat-connection`; `neat-set-default-connection` is an interactive picker that switches which one source buffers (running `neat-mode`) talk to. Connections drop out of the registry automatically on disconnect or server death, and the default demotes to the next-most-recent live connection if it goes away.
22
22
- Integration test suite now parameterised over nREPL implementations: `neat-it--server-impls` describes each, and any one whose executable is on PATH gets its own `describe` block. Ships with entries for Clojure and Babashka.
23
+
- REPL: multi-line input. `RET` only submits when the form parses as balanced; otherwise it inserts a newline. Balance check uses `neat-repl-input-syntax-table` (Emacs Lisp by default; override for languages with very different bracketing rules).
24
+
- REPL: input history persistence. New `neat-repl-history-file` defaults to `~/.emacs.d/neat-repl-history`; history is loaded on REPL start and saved on buffer kill. Set to nil to disable.
25
+
- REPL: namespace-aware prompt. The prompt is now derived from `neat-repl-prompt-format` (default `"%s> "`) and updates in response to the server's `ns` field, so `user> ` becomes `myapp.core> ` after `(in-ns 'myapp.core)`. `neat-repl-default-ns` controls what appears before the server has reported one.
26
+
27
+
### Removed
28
+
29
+
-`neat-repl-prompt` (defcustom). Replaced by `neat-repl-prompt-format` and `neat-repl-default-ns`. There were no released versions, so this is just churn within the unreleased changelog window.
0 commit comments