Skip to content

Conversation

r0man
Copy link
Contributor

@r0man r0man commented Apr 17, 2025

This is the CIDER part of pretty printing values in the Inspector. The changes to Orchard and cider-nrepl are here:

You can now toggle the pretty printing of values in the inspector with the P key and customize their initial presentation by adjusting the cider-inspector-pretty-print customization option.

The data structure shown on the following pictures was this:

{{:a 0 :bb "000" :ccc [] :d [{:a 0 :bb "000" :ccc []} {:a -1 :bb "111" :ccc [1]} {:a -2 :bb "222" :ccc [2 1]} {:a -3 :bb "333" :ccc [3 2 1]} {:a -4 :bb "444" :ccc [4 3 2 1]}]} {:a -1 :bb "111" :ccc [1] :d [{:a 0 :bb "000" :ccc []} {:a -1 :bb "111" :ccc [1]} {:a -2 :bb "222" :ccc [2 1]} {:a -3 :bb "333" :ccc [3 2 1]} {:a -4 :bb "444" :ccc [4 3 2 1]}]}} 

Without pretty printing enabled (as before):

map-normal-mode

With pretty printing enabled (in normal mode):

pprint-normal-mode

With pretty printing enabled (in object mode):

pprint-object-mode


  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)
@bbatsov
Copy link
Member

bbatsov commented Apr 17, 2025

(file-missing "Cannot open load file" "No such file or directory" "clojure-ts-mode")

That's happening because it now requires Emacs 30. (the TreeSitter support is quite buggy on Emacs 29 and I wanted to push more people to use a newer Emacs)

@r0man r0man force-pushed the pretty-view branch 2 times, most recently from 9868c37 to bb1ea6e Compare April 18, 2025 07:44
@r0man
Copy link
Contributor Author

r0man commented Apr 18, 2025

This is also ready from my side.

@r0man r0man force-pushed the pretty-view branch 3 times, most recently from 01c47c7 to 5671ed5 Compare April 19, 2025 07:58
@r0man
Copy link
Contributor Author

r0man commented Apr 19, 2025

@alexander-yakushev I added back the customization option and some docs for it.

Copy link
Member

@alexander-yakushev alexander-yakushev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go!

@alexander-yakushev alexander-yakushev merged commit 600aa64 into clojure-emacs:master Apr 22, 2025
10 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants