Fork me on GitHub
#calva
<
2022-07-03
>
pinkfrog11:07:01

How can I make the data to be pretty print by default? I am on cljs, and the content is not formatted. My configuration:

"calva.prettyPrintingOptions": {
    "printEngine": "pprint",
    "enabled": false,
    "width": 120,
    "maxLength": 50
  },
The *a object is a response from the js axios package.

Max15:07:21

You’ve got enabled: false right in the middle of that config, perhaps that’s the problem?

pinkfrog15:07:12

Yeah. Magically misread that part.

pinkfrog15:07:45

Enabled it but with no success. Note to say I am on cljs, not clj.

bringe00:07:23

I experience this sometimes too. I think it might be related to JS objects being in the result

bringe00:07:43

If I set the printEngine to Calva it works

bringe00:07:52

Also, just to rule this out, make sure you’re using jack-in or at least including cider-nrepl in your repl dependencies. I realized in the past that that’s why it wasn’t working for me, but the problem I experience sometimes now is even with cider-nrepl included. https://github.com/BetterThanTomorrow/calva/issues/1259

bringe00:07:30

I haven’t verified that the JS objects are the cause - it’s just a theory.

pinkfrog00:07:21

I switched to “calva” as the engine and now it works.

pinkfrog00:07:24

I’ve gone through the same route as in the above issue by enabling “repl-pprint true” in shadow, but it doesn’t work either.

pinkfrog02:07:03

Thanks!

👍 1
bringe03:07:10

Thanks for reporting simple_smile