Skip to content

Show a mode-line spinner during async refactorings - #599

Merged
bbatsov merged 1 commit into
masterfrom
async-spinners
Jul 12, 2026
Merged

bbatsov merged 1 commit into
masterfrom
async-spinners

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 12, 2026

Copy link
Copy Markdown
Member

Follow-up to the async work: cljr-rename-symbol, cljr-change-function-signature and cljr-rename-file-or-dir now show a mode-line spinner while the middleware is analysing/working, so it's clear the command is still running rather than having silently done nothing.

The spinner starts when the request is fired and stops on every termination path (completion, timeout, error), wired into the two async helpers so all the async commands get it uniformly. It reuses CIDER's spinner (cider-spinner-start), so it honors cider-show-spinner and the related settings.

Validated live: the spinner is active right after the command returns (during the async search) and stopped once the refactoring completes.

Heads up on deps: this adds spinner to Package-Requires. It's a tiny library and already a transitive dependency of cider (which we already require), so it's present in every clj-refactor user's Emacs - but if you'd rather not declare a new dependency, I can roll a dependency-free indicator instead. Your call.

The async operations (cljr-rename-symbol, cljr-change-function-signature,
cljr-rename-file-or-dir) now run a mode-line spinner while the middleware
is working, so it's obvious the command is still in progress rather than
having silently done nothing.

The spinner is started in the calling buffer when the request is fired
and stopped on every termination path (completion, timeout, error) in the
two async helpers, so all async commands get it uniformly. It reuses
CIDER's spinner (cider-spinner-start), so it respects cider-show-spinner
and the related settings. Adds spinner to Package-Requires - it's a tiny
library already pulled in transitively by cider.
@bbatsov
bbatsov merged commit 9bdd019 into master Jul 12, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant