Skip to content

Question: How can I always pretty-print outputs in CIDER REPL and evaluation results? #3745

Open
@pdelfino

Description

@pdelfino

Hi,

I am not sure if I am missing something or if there might be a bug. Probably the former.

Anyway, I would like to ask for your help.

I'm using CIDER on Emacs for Clojure development.

Whenever I execute the command cider-eval-sexp-at-point, I see the output in the Emacs mini-buffer. I can also see it in the *Messages* buffer (since everything displayed in the mini-buffer goes there).

Here are my settings in my init file:

(use-package cider
  :straight t
  :config
  (setq nrepl-log-messages t))

I would like to change it so that:

  1. Everything printed in the REPL is always pretty-printed.
  2. The output of cider-eval-sexp-at-point is pretty-printed in the REPL.

I tried:

(use-package cider
  :straight t
  :config
  (setq cider-use-overlays nil)
  (setq cider-repl-use-pretty-printing t)
  (setq cider-print-fn 'pprint))

But, it did not work. I am still seeing things as before the changes with mini-buffer showing the output of function calls.

How can I configure CIDER to achieve the desired behavior?

Note: I try to keep my config file reproducible with use-package declarative style. Relevant docs on Cider.

This is my whole init file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions