You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to control where the cider-spinner appears--specifically, in the file buffer where I'm eval'ing my code. Mentioned this in Slack: https://clojurians.slack.com/archives/C0617A8PQ/p1696125697359089. Others thought this would be a neat feature to have as well.
Describe the solution you'd like
Some sort of defcustom that I can set.
Describe alternatives you've considered
I have the above working for me, but it's probably too hacky to include as a PR. I modified two lines in cider-client.el and added one hook to my config to get the desired effect of having the spinner show in file buffer. The following are those changes; my code follows the commented out lines:
(defuncider-nrepl-request:eval (input callback &optional ns line column additional-params connection)
"Send the request INPUT and register the CALLBACK as the response handler.If NS is non-nil, include it in the request. LINE and COLUMN, if non-nil,define the position of INPUT in its buffer. ADDITIONAL-PARAMS is a plistto be appended to the request message. CONNECTION is the connectionbuffer, defaults to (cider-current-repl)."
(let ((connection (or connection (cider-current-replnil 'ensure)))
(eval-buffer (current-buffer)))
(run-hooks 'cider-before-eval-hook)
(nrepl-request:eval input
(lambda (response)
(when cider-show-eval-spinner
;; (cider-eval-spinner connection response)
(cider-eval-spinner eval-buffer response))
(when (and (buffer-live-p eval-buffer)
(member"done" (nrepl-dict-get response "status")))
(with-current-buffer eval-buffer
(run-hooks 'cider-after-eval-done-hook)))
(funcall callback response))
connection
ns line column additional-params)
;; (cider-spinner-start connection)
(cider-spinner-start eval-buffer)))
(add-hook 'cider-after-eval-done-hook 'spinner-stop)
Additional context
I needed to add the 'spinner-stop to the 'cider-after-eval-done-hook, because the cider-eval-spinner function wasn't seeming to receive the eval response, as far as I can tell.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I would like to control where the cider-spinner appears--specifically, in the file buffer where I'm eval'ing my code. Mentioned this in Slack: https://clojurians.slack.com/archives/C0617A8PQ/p1696125697359089. Others thought this would be a neat feature to have as well.
Describe the solution you'd like
Some sort of
defcustom
that I can set.Describe alternatives you've considered
I have the above working for me, but it's probably too hacky to include as a PR. I modified two lines in
cider-client.el
and added one hook to my config to get the desired effect of having the spinner show in file buffer. The following are those changes; my code follows the commented out lines:Additional context
I needed to add the 'spinner-stop to the 'cider-after-eval-done-hook, because the
cider-eval-spinner
function wasn't seeming to receive the eval response, as far as I can tell.The text was updated successfully, but these errors were encountered: