Repository navigation
Show a mode-line spinner during async refactorings - #599
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the async work:
cljr-rename-symbol,cljr-change-function-signatureandcljr-rename-file-or-dirnow 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 honorscider-show-spinnerand 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
spinnertoPackage-Requires. It's a tiny library and already a transitive dependency ofcider(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.