Skip to content

v0.1.0

Latest

Choose a tag to compare

@bbatsov bbatsov released this 20 May 09:44

First tagged release of neat, a small, language-agnostic nREPL client for Emacs.

The codec, async dispatch, comint REPL, and source-buffer minor mode are all in place; eldoc, completion-at-point, xref find-definition, doc-lookup, namespace-aware eval, and stdin/need-input handling work against any conformant server. Tested against Clojure (nrepl/nrepl), Babashka, and Basilisp via the parameterised integration suite.

Expect rough edges — this is the start of the road, not the end.

Highlights

  • Pure-elisp bencode codec with a stack-based decoder.
  • Async dispatch via a single callback per request.
  • comint-based REPL with multi-line input, persistent history, namespace-aware prompt, and styled output.
  • neat-mode source-buffer minor mode wiring up eval, load-file, find-definition (xref), doc lookup, eldoc with arg highlighting, completion-at-point with type annotations, and namespace-aware evaluation.
  • Multi-connection registry with default-connection routing and a *neat-connections* tabulated-list inspector.
  • Mode-line indicator showing the active connection.
  • Graceful handling of dead connections, malformed bencode, and need-input reads.

Added

  • neat-load-file library op and neat-load-buffer-file interactive command (bound to C-c C-l).
  • neat-eval accepts optional file, line, and column arguments; the source-buffer eval commands compute these so error messages can point at the actual source location.
  • xref backend in neat-mode and neat-repl-mode buffers — M-. jumps to definitions via the lookup op, M-, pops back. Customize timeout via neat-lookup-timeout.
  • neat-list-connections*neat-connections* tabulated-list buffer with RET = set default, d = disconnect, g = reload.
  • neat-disconnect-connection interactive picker; library-level primitive is neat-disconnect.
  • neat-show-doc-at-point (C-c C-d C-d in both neat-mode and neat-repl-mode) pops a *neat-doc* help buffer with full docstring, arglists, and source location.
  • Completion candidates carry the server-reported type via :annotation-function.
  • stdin op + need-input handling — prompts in the minibuffer when evaluated code reads from stdin.
  • Mode-line shows the active connection ([host:port] or [closed]).
  • neat-disconnect-functions abnormal hook fires when a connection's process dies; the REPL marks itself closed.
  • Process filter survives malformed bencode (catches, logs, recovers).
  • neat-repl-clear-buffer (C-c M-o).
  • Buffer-local namespace: neat-ns defvar-local, neat-set-ns interactive command (C-c M-n), and neat-buffer-ns-function swappable seam for language-specific parsers.
  • Initial project skeleton with Eldev and Buttercup.
  • Core nREPL ops in neat-client: describe, clone, eval, load-file, stdin, interrupt, close, completions, lookup.
  • Integration test suite parameterised over nREPL implementations (Clojure, Babashka, Basilisp).
  • .nrepl-port auto-discovery — M-x neat RET RET is enough in a project with a running server.
  • Multi-connection support with auto-demotion on disconnect.
  • REPL multi-line input via parse-partial-sexp, persistent history, namespace-aware prompt.
  • Completion-at-point and eldoc active in both source buffers and the REPL.
  • Eldoc highlights the current argument in the displayed arglist (works for any Lisp-family mode; swappable seams for other languages).

Changed

  • neat-active-connection falls back to neat-default-connection when the buffer-local override is dead.
  • neat-eval and neat-load-file take a property list of options after the required positional args (instead of stacking positional &optionals).
  • Connection routing primitives moved from neat.el to neat-client.el where they belong as a library-level concern.

Removed

  • neat-repl-prompt defcustom (replaced by neat-repl-prompt-format + neat-repl-default-ns during the unreleased churn window).

See CHANGELOG.md for the unabridged list.