Fork me on GitHub
#cider
<
2021-05-20
>
Sam Ritchie14:05:46

Emacs keyboard macro!

dpsutton14:05:12

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

ghadi20:05:41

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

ghadi20:05:47

I am using latest CIDER 1.1.0.1, on homebrew installed emacs-plus@27

ghadi20:05:45

Does anyone know how to troubleshoot that?

dpsutton20:05:03

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

dpsutton20:05:36

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)))

ghadi20:05:40

thanks. I will try that @dpsutton.

ghadi20:05:55

It happen most often when I am screensharing with someone 🙂

ghadi20:05:00

(but not exclusively)

dpsutton20:05:44

(i'm surprised to see you using nrepl)

ghadi20:05:43

old habits die hard