Fork me on GitHub
#cider
<
2021-02-16
>
jumar04:02:17

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

dpsutton05:02:36

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

jumar08:02:50

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

dpsutton05:02:06

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

dpsutton05:02:20

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

jumar08:02:32

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

gdanov12:02:28

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

๐Ÿ‘ 3
gdanov12:02:06

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

gdanov12:02:31

the nrepl also adds to the performance issues btw

bozhidar08:02:16

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

bozhidar08:02:42

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.

๐Ÿ‘ 3
jumar12:02:05

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.

bozhidar08:02:20

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

jumar12:02:21

Yeah, having a dedicated buffer would be great.

bozhidar08:02:44

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

bozhidar08:02:19

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

bozhidar10:02:59

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.

๐Ÿ‘ 3
gdanov12:02:47

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?

gdanov12:02:33

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

dpsutton13:02:36

@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