Skip to content

neorepl 0.5.0

Choose a tag to compare

@bbatsov bbatsov released this 05 Nov 06:08
· 8 commits to main since this release

CIDER in a terminal.

Features

  • #45: The REPL shows the delimiter that pairs with the one at the cursor, and a closer that pairs with nothing, or with the wrong kind, in red, rather than JLine moving the cursor to the opener for half a second.
  • #48: The REPL says when the server it started runs another cider-nrepl than the one jack-in adds, as when a Leiningen project's :plugins or ~/.lein/profiles.clj has one.
  • #49: The REPL takes readline's settings from ~/.inputrc, or the file $INPUTRC names, so set editing-mode vi there picks the vi keymap, and $if neorepl holds what's for neorepl alone.
  • #50: The completion menu shows a candidate's namespace next to its type, unless the candidate names it already.
  • #51: Enter in an unfinished form starts a line indented for it, the way cljfmt indents by default.
  • #52: The REPL highlights its commands as they're typed, ,doc and the like, and a command name that isn't one in red.
  • #53: C-x C-e in the REPL opens what's typed in $EDITOR and brings back what's saved, and ,edit without a name opens the current namespace's file.
  • #55: neorepl refs lists the functions that use a var, or with --deps, the ones it uses, as ,refs and ,deps do in the REPL and the refs tool does for MCP, with cider-nrepl.
  • #59: neorepl eval --ns NS evaluates in a namespace, loading it first unless it's there, and leaves the session in its own, as the MCP eval tool's ns does.
  • #59: neorepl eval -f FILE --line N:COL evaluates only the top-level form at that spot, in the file's namespace, after its ns form, and with - takes FILE's text from standard input, so an editor can evaluate the form at the cursor in a buffer it hasn't saved.
  • #59: doc/editors.md sets up Neovim, Emacs and Helix to evaluate in neorepl, with the REPL beside them.
  • #60: Eldoc shows under the input, wherever the cursor is, with the parameter the argument at the cursor goes into in bold and the arglists that can't take that many arguments faint.
  • #60: Eldoc matches the arguments of macros and special forms by their shape, so in defn a docstring goes to doc-string? and a map after it to attr-map?.
  • #64: neorepl eval --reload, and the MCP eval tool's reload, reload the namespaces whose files changed before evaluating, with cider-nrepl's clj-reload, which keeps what defonce defined, and don't evaluate when that fails.
  • #64: ,autoreload has the REPL reload what changed before each evaluation, and before ,test, ,inspect and ,ns.
  • #65: ,ns without a name browses the namespaces, the project's or every loaded one, filtering them as their names are typed, and their public vars and docs, switching to a namespace or opening a var in $EDITOR.
  • #66: ,spec browses the specs, filtering them as their names are typed, a spec's form with the specs it names to go to, and examples generated from it.
  • #69: The REPL shows what the server's own threads print, like a web server's handlers, above the prompt, with nREPL 1.5 or later and babashka.
  • #71: The REPL shows the values sent to tap> above the prompt, and ,tap opens the last one in the inspector, with cider-nrepl 0.64 or later.
  • #70: neorepl profile and ,profile time every call of the functions named, or of a namespace's, and show what was measured, with unprofile to stop and --clear, or ,profile-clear, to start over, on cider-nrepl's profiler.
  • #74: ,set lists the REPL's settings and turns them on or off, C-x C-h and C-x C-q toggle eldoc and quiet, and ~/.config/neorepl/config.edn says what they start as.
  • #75: The REPL's pretty setting, on C-x C-p, prints values pretty or plain, and print-length and print-level limit how much of them it shows.
  • #77: C-x Enter in the REPL evaluates only the form at the cursor, or the one right before it, and brings back what's typed, with the cursor where it was.
  • #77: The REPL's prompt shows whether the last evaluation worked, and how long it took, at its right, unless the outcome setting's off.

Changes

  • #63: neorepl takes babashka 1.13.227 or newer, which has the JLine and socket classes it went without, and a test failure on a babashka server from 1.13.227 keeps its own file, as one in a helper does.
  • #60: Eldoc looks names up in the background, so typing no longer waits up to half a second on the server for a function it hasn't looked up yet.
  • #45: The REPL shows more of what reads like a special form as one: the forms macros expand into, like let*, and the defining, binding and threading macros, deftest, -> and with-open among them.

Bug fixes

  • #54: neorepl mcp sends a session's evaluations one at a time, so cancelling one no longer has nREPL drop the calls queued behind it, and a call cancelled while it waits is never sent.
  • #56: A ClojureScript test's error outside an assertion shows up at the test's line, rather than at line NaN.
  • #56: Running a ClojureScript namespace's tests, or switching to them with ,ns, from the namespace they test no longer fails on piggieback as a circular dependency, and ,ns loading a namespace no longer leaves a nil in *2.
  • #58: Lookups take an empty list in a server's answer for the nil it stands for, so doc no longer prints [] for what nbb doesn't find, and doc and where no longer fail on a var made with intern without cider-nrepl.
  • #58: Code that throws on nbb fails the evaluation, which nbb's server says only with an :ex, so neorepl eval exits 1 and the MCP eval tool reports an error.
  • #58: source, macroexpand and apropos work on Basilisp.
  • #58: ,ns switches namespaces on nbb, whose server takes no notice of in-ns.
  • #67: neorepl server says the server's up once its port file is there, rather than as nREPL says where it listens, before writing the file, so a command run right after finds it.
  • #70: neorepl untrace and ,untrace leave alone the functions the server's own tools call, which untracing traced first, taking the server down.
  • #74: A reload right after jack-in, by ,autoreload or neorepl eval --reload, waits for the one jack-in starts in the background, rather than racing it.