cider

enn 2024-08-22T14:43:59.988629Z

Is there any way to get the CIDER REPL to place the point on a separate line from the REPL prompt? I.e. this:

user>
_
instead of this
user> _

šŸ‘ 1
2024-08-22T14:53:54.048139Z

I think that’d be quite nice. I don’t know of anything though. šŸ˜”

djm 2024-08-22T14:54:13.702749Z

You could redefine this:

(defun cider-repl-prompt-default (namespace)
  "Return a prompt string that mentions NAMESPACE."
  (format "%s> " namespace))
(I.e. add \n to the end of the string)

šŸ‘€ 1
2024-09-23T14:05:09.276949Z

Haven’t had luck with this so far. There are some related vars that looked to let me plug a fn like this into, but I still don’t get newlines.

djm 2024-09-23T14:08:13.474269Z

@mikerod Redefining cider-repl-prompt-default worked fine for me:

(defun cider-repl-prompt-default (namespace)
  "Return a prompt string that mentions NAMESPACE."
  (format "%s> \n" namespace))
(i.e. the same as the built-in one that I pasted above, but with "\n" added to the string). Doesn't that do what you want?

2024-09-23T14:25:11.201869Z

I tried it initially and I didn’t get a newline. I was confused why. I then found a more ā€œofficialā€ var for this cider-repl-prompt-function where you should be able to bind a fn of choice (and it uses the default as default). I had no luck with that so far either. I think I’m on latest cider released.

2024-09-23T14:25:32.124759Z

I haven’t done enough troubleshooting of this yet though.

djm 2024-09-23T14:47:37.806559Z

Isn't this what you're trying to accomplish?

2024-09-23T14:49:47.411429Z

Yes

2024-08-23T14:17:15.080589Z

Oh. I’m going to check that out. Thanks.