Fork me on GitHub

How can I make the repl buffer (after cider-jack-in open on the right (vertical split of the current window) instead of at the bottom (horizontal split)?


cider uses either display-buffer or pop-to-buffer which are C emacs functions. I don't see any information about how to affect it. From experience if the window is wide it will split vertically and if tall will split horizontally. I don't know if there's a way to force that or not


Yeah, I'm using 27# monitor and Cider alwasys considers it "tall" enough to split horizontally


this works for me (let ((split-height-threshold nil) (split-width-threshold 0)) (pop-to-buffer (get-buffer-create "random"))). so you could make your own jack-in-function and instead of calling pop-to-buffer call cider-jack-in


or if you think those are sensible defaults you could just set them in your config


Is there a way to switch the REPL buffer to a more leightweight mode (something like Fundamental) to improve performance, especially when writing a lot of text into the buffer (like big data structures or logs)?


the repl buffer (and emacs) have problem with long lines. when you need to dump big structures always use pprint which splits them into separate lines

๐Ÿ‘ 1

as long as the lines are not too long 4-5 thousand lines within ~10secs are not an issue


the nrepl also adds to the performance issues btw


If you change the mode this will break everything in the REPL.


For logs I've long advised to be written to files instead of to the REPL, at least during development. At some point I wanted to implemented some output redirection logic, but this was hard to do in combination with streaming so I abandoned the idea.

๐Ÿ‘ 1

I do this for DEBUG logs, but I want INFO and stdout in the REPL so it's right in front of me instead of having to reach out to the terminal, copying useful values from logs, etc.


One nuclear solution would be to redirect all output to some dedicated buffer, which you can achieve via cider-interactive-eval-output-destination.


Yeah, having a dedicated buffer would be great.


In my mind that's better than switch the REPL mode, as it least it won't affect your REPL.


(But this works only on interactive eval output, as I thought it'd be weird if REPL output went to a different buffer)


I've cut a small update to clj-refactor today. Nothing fancy, but at least you'll be getting refactor-nrepl with all deps updated to their current versions.

๐Ÿ‘ 1

I just got the hunch that Cider does not integrate with imenu. After looking in the documentation and googling I'm convinced there's no integration. Is this correct?


as a background: I've been using cider for 4 years and always rely on imenu or helm-imenu and always thought Cider provides the symbols


@jumar one thing you can do is just not subscribe to out. Makes the repl a little less good but if youโ€™re drowning in logs it can make the experience pleasant