Emacs keyboard macro!
clojure-lsp can do this as well as clj-refactor. My coworker wrote a lein plugin that will check and print a correct one in <https://github.com/camsaul/lein-check-namespace-decls>
I'm having a weird issue where I type in a simple expression like :foo
and the spinner at the bottom of the screen takes forever
I am using latest CIDER 1.1.0.1, on homebrew installed emacs-plus@27
Does anyone know how to troubleshoot that?
m-x nrepl-toggle-message-logging
and watch the nrepl traffic. In theory that just spins while waiting on the done handler for the id of the form you evaluated. So watching the traffic could help shed some light
the code to stop spinning is simply
(defun cider-eval-spinner-handler (eval-buffer original-callback)
"Return a response handler to stop the spinner and call ORIGINAL-CALLBACK.
EVAL-BUFFER is the buffer where the spinner was started."
(lambda (response)
;; buffer still exists and
;; we've got status "done" from nrepl
;; stop the spinner
(when (and (buffer-live-p eval-buffer)
(let ((status (nrepl-dict-get response "status")))
(or (member "done" status)
(member "eval-error" status)
(member "error" status))))
(with-current-buffer eval-buffer
(when spinner-current (spinner-stop))))
(funcall original-callback response)))
thanks. I will try that @dpsutton.
It happen most often when I am screensharing with someone 🙂
(but not exclusively)
(i'm surprised to see you using nrepl)
old habits die hard