-
(Breaking) Require Emacs 28.1+.
-
(Breaking) Require CIDER 2.0+ (and drop the small compat shims for the pre-2.0 API names).
-
Use refactor-nrepl's namespaced op names (
refactor/find-symbol,refactor/clean-ns, …) when the middleware advertises them (refactor-nrepl 3.13.0+, the injected version is now 3.14.0), falling back to the bare names on older versions. refactor-nrepl treats the namespaced forms as canonical and plans to drop the bare names, and namespacing avoids op-name collisions with other middleware. -
Don't error out of
cider-connected-hookwhen the refactor-nrepl middleware is missing: the connect-time version probe now degrades to the existing "out of sync" warning instead of aborting the startup checks with a cryptic error (visible with CIDER 2.0, whose senders reject unsupported ops client-side). -
Fix the offline ns-form sort (
cljr-clean-nsandcljr-auto-sort-nswithout a REPL) silently doing nothing inclojure-ts-modebuffers, where the tree-sitterforward-sexp-functionbrokeclojure-sort-ns. -
cljr-rename-symbol,cljr-find-usages,cljr-inline-symbolandcljr-change-function-signaturenow send an explicitignore-errorsvalue that matchescljr-ignore-analyzer-errors, instead of a nil value that was dropped on the wire. With the default (nil) this means the strict behavior the option documents actually takes effect - a project with an unanalyzable namespace now surfaces a warning rather than silently skipping it. -
cljr-slashno longer sends the obsoletelanguage-contextparameter to thesuggest-libspecsop (superseded bybuffer-language-context/input-language-contextin refactor-nrepl 3.7.0). -
The asynchronous refactorings (
cljr-rename-symbol,cljr-change-function-signature,cljr-rename-file-or-dir) now show a mode-line spinner while the middleware is working, so it's clear the operation is still running. Uses CIDER's spinner, so it honorscider-show-spinnerand friends. -
cljr-rename-symbolandcljr-change-function-signaturenow find their occurrences asynchronously. Locating every occurrence analyses the whole project, which on a cold cache or a large project could freeze Emacs for a long time; now the command returns immediately and the rename (or the change-signature edit buffer) happens once the search finishes, so Emacs stays responsive meanwhile. As a side effect they now also honorcljr-middleware-ignored-paths. -
cljr-rename-file-or-dirnow runs asynchronously. Renaming a file rewrites references to it across the whole project, which can take a while; instead of freezing Emacs on a synchronous round-trip, the command returns immediately and finishes (renaming the file, revisiting affected buffers) once the middleware responds. -
Preview project-wide refactorings before they touch disk.
cljr-rename-symbol,cljr-change-function-signatureandcljr-inline-symbolnow gather all their edits first and show them as a diff, and nothing is written until you confirm. Controlled by the newcljr-preview-refactorings(default on); set it to nil for the old apply-immediately behavior. -
New
cljr-undo-last-refactoringreverts every file changed by the last applied rename or change-signature in one step (bound tour, and inclj-refactor-menu). -
cljr-change-function-signaturecan now add and remove parameters, not just reorder and rename them. In the edit buffer,aadds a parameter (you're prompted for its name and a placeholder to insert at call sites) andk/dmarks one for removal. Added parameters get their placeholder inserted at every call site; removals are never auto-deleted (an argument might have side effects) - the affected call sites are routed to the manual-intervention buffer for review. -
cljr-change-function-signaturenow handles multi-arity functions. It asks which arity to change, then updates only that arity's definition and the call sites whose argument count matches (call sites of other arities are left alone). Run it once per arity to change several. -
Fix
cljr-change-function-signatureerroring with "Can't do work on functions of multiple arities" on ordinary single-arity functions. It parsed the middleware'sarglists-strassuming an outer-paren format that current CIDER no longer sends, which had broken even the existing reorder/rename against a live REPL. -
cljr-clean-nsdegrades gracefully without a REPL. When theclean-nsmiddleware op isn't available it falls back to sorting the ns form with clojure-mode'sclojure-sort-nsinstead of erroring - pruning unused libspecs still needs the middleware and is skipped. Auto-sort after ns changes (cljr-auto-sort-ns) now works offline too. -
Fix
cljr-slashandcljr-add-missing-libspecerroring with "No linked CIDER sessions" when used without a connected REPL, instead of falling back to their offline behavior.cljr--op-supported-pnow returns nil when disconnected rather than signaling. -
Performance: the background artifact-list warming (on REPL connect, per
cljr-populate-artifact-cache-on-startup) now populates the Emacs-side cache, not just refactor-nrepl's server-side one. Previously the firstcljr-add-project-dependency/cljr-update-project-dependencystill blocked on the full artifact-list transfer even though a warmer had already run; now that common case is served from cache without a middleware round-trip. -
(Breaking) Remove the deprecated
namespace-aliasescode path fromcljr-slash, along with thecljr-slash-uses-suggest-libspec,cljr-suggest-namespace-aliasesandcljr-assume-language-contextdefcustoms.cljr-slashhas used the language-context-awaresuggest-libspecsop (with an offline fallback) by default for a while now; the old path and its options are gone. -
cljr-promote-function: promoting a#(...)literal to(fn ...)now works without a REPL - it delegates to clojure-mode'sclojure-promote-fn-literalinstead of a home-grown, less robust converter. Only thefn->defnpromotion (which needs captured-locals analysis) still requires the middleware, and it no longer shows the "the project will be evaluated" warning for the pure literal case. -
cljr-remove-letnow works without a REPL. It inlines the let's bindings locally - in reverse order, so a binding that refers to an earlier one still resolves - and removes the let, instead of drivingcljr-inline-symbol(which required the middleware and showed the "the project will be evaluated" warning once per binding). -
Fix
cljr-add-declarationtreating a name as "already declared" when it merely contains, or is contained by, another symbol - names with regexp specials like*db*orvalid?were matched incorrectly. -
cljr-describe-refactoringnow opens the refactoring's wiki page in your browser. The previous in-Emacs rendering scraped the wiki's HTML, which broke when GitHub changed its markup and 404'd for the clojure-mode commands in the menu; the candidate list is now limited to thecljr-*commands that actually have wiki pages. This also drops thesgml-modedependency. -
cljr-add-project-dependency/cljr-update-project-dependency: give a clear error instead of a raw "search failed" when the project file has no:deps/:dependencies, and drop a stray, no-op middleware check after hotloading. -
(Deprecation)
cljr-introduce-letandcljr-move-to-letare now obsolete aliases for clojure-mode'sclojure-introduce-let/clojure-move-to-let(they were already thin wrappers). The keybindings and menu now point at theclojure-*commands directly. -
cljr-move-formnow picks the target file withread-file-name(honoring your completion framework) instead of hardcodingido-find-file. -
cljr-cycle-threadnow reports a clear error when point isn't inside a threading macro, instead of silently doing nothing. -
Surface
cljr-reify-to-defrecordinclj-refactor-menu(it had no keybinding or menu entry, so it was effectively undiscoverable). -
cljr-add-missing-libspecdegrades gracefully without a REPL. For an aliased symbol likestr/join, when refactor-nrepl'sresolve-missingop isn't available (or finds nothing) it now falls back tocljr-magic-require-namespaces- so common aliases still work offline, and a missing library can be added and hotloaded (seecljr-slash-add-missing-libs). Previously it errored without a connected REPL. -
cljr-slashnow works without a running REPL. When refactor-nrepl'ssuggest-libspecsop isn't available, it falls back to the staticcljr-magic-require-namespacestable (honoring each entry's:onlylanguage context) instead of erroring, so common aliases likestr/iostill get required before you jack in. -
cljr-slashcan add and hotload a missing library. Entries incljr-magic-require-namespacesmay now carry an:artifactcoordinate (e.g.("json" "cheshire.core" :artifact "cheshire/cheshire")); when the namespace isn't on the classpath,cljr-slashoffers to add that artifact as a project dependency and hotload it. Controlled by the newcljr-slash-add-missing-libs(default on). -
Add
clj-refactor-menu, atransientmenu of all commands grouped by category (bound tohhunder your keybinding prefix, e.g.C-c C-m hh). It mirrors the two-letter keybindings, so it doubles as a way to learn them, and its Options section toggles common settings for the session. -
Surface clojure-mode's collection-type conversions (
clojure-convert-collection-to-list/-map/-vector/-set/-quoted-list) inclj-refactor-menuunder "Convert collection to", so they're discoverable from clj-refactor. -
Performance: project-wide refactorings (rename symbol, inline symbol, change function signature) no longer leave behind buffers they had to open, which previously slowed Emacs down on large renames.
-
cljr-project-cleannow shows a progress reporter instead of freezing Emacs silently. -
Performance: cache the artifact and version lists fetched by the dependency commands, so they aren't re-requested on every invocation. The TTL is configurable via
cljr-artifact-cache-ttl(default 300s; set to nil to disable). -
Performance:
cljr-slashcaches libspec suggestions per alias (also governed bycljr-artifact-cache-ttl), so repeatedly typing an unresolved alias likestr/no longer does a middleware round-trip on every/. -
(Breaking) Drop the
multiple-cursors,hydraandinflectionsdependencies.- The hydra menus are replaced by the new
clj-refactor-menutransient (see above). - The
multiple-cursorsintegration is gone; let/extract/promote refactorings now always prompt for names. Thecljr-use-multiple-cursorsoption is removed. - Parameter-name guessing in
cljr-create-fn-from-examplenow uses a small built-in inflector instead ofinflections.
- The hydra menus are replaced by the new
-
(Breaking) Remove the
cljr-thread,cljr-thread-first-all,cljr-thread-last-all,cljr-unwind,cljr-unwind-all,cljr-cycle-privacy,cljr-cycle-if,cljr-cycle-coll,cljr-thread-all-but-last,cljr-use-metadata-for-privacyandcljr-find-usages-ignore-analyzer-errorsaliases, all deprecated back in 2.3.0. Use theclojure-*equivalents (now in clojure-mode) andcljr-ignore-analyzer-errors. -
Use CIDER 1.23's renamed nREPL API (
cider-nrepl-sync-request,cider-ensure-session) when available, while staying compatible with older CIDER releases. Fixes byte-compilation warnings against recent CIDER. -
Re-enable
cljr-hotload-dependency, now that refactor-nrepl hotloads dependencies on top ofclojure.tools.deps(refactor-nrepl #231). It also acceptsdeps.edn-style coordinate maps in addition to Leiningen vectors.