cider

neumann 2025-11-26T01:06:08.157329Z

Posting here for more visibility: https://clojurians.slack.com/archives/C04CAKAGADU/p1763927711960729

👍 1
huangzlong 2025-11-26T15:25:54.562259Z

hello, how can i get code completetion here? is this achievable? the type hints dosen't seem to work.

prnc 2025-11-26T17:58:56.559779Z

Hi 👋 is the following my misconfig or is this the expected behaviour? After running cider-repl-clear-output, the REPL output clears correctly and the prompt appears at the top of the buffer. Then... when I eval something, say (print "foobar") from a connected buffer, the output appears above the visible prompt, outside the current viewport i.e. I need to scroll up to see it. Once I scroll up and find the output, all is well 😉 and subsequent evaluations then appear correctly in the visible area. Is there a way to change/fix this behaviour?

bozhidar 2025-12-02T15:06:18.469639Z

I guess no one reads the linked discussions, but in general it's much simpler to just enable cider-repl-display-output-before-window-boundaries 😉

bozhidar 2025-12-02T15:08:40.776269Z

Still, if someone has performance issues then - more hacky solutions are in order.

Harold 2025-11-26T20:32:30.462359Z

I have also experienced this many times. So many in fact that I have developed muscle memory for typing ,clear RET 1 RET which (mostly) avoids the problem.

1
Harold 2025-11-26T20:32:40.886649Z

Seeing this fixed would be great.

Harold 2025-11-26T20:34:29.000809Z

2019: https://github.com/clojure-emacs/cider/issues/2595

Harold 2025-11-26T20:36:07.183129Z

a funny (clever!) workaround is given there.

prnc 2025-11-27T14:17:37.947899Z

I see, thanks Harold! Will dig deeper! For now I got Claude to ‘fix’ it for me

(defun prnc/cider-repl-follow-output (&rest _)
  (let ((repl-buffer (cider-current-repl)))
    (when repl-buffer
      (let ((window (get-buffer-window repl-buffer)))
        (when window
          (with-selected-window window
            (when (derived-mode-p 'cider-repl-mode)
              (goto-char (point-max))
              (recenter -1))))))))
(advice-add 'cider-repl-clear-buffer :after #'prnc/cider-repl-follow-output)

Harold 2025-11-27T15:18:22.483469Z

nice! 🤭