Fork me on GitHub
#cider
<
2017-01-06
>
dorianc.b19:01:08

Hello everyone, I’m new to emacs and cider and after the initial setup I’m actually liking it much better than atom. The only issue I’m having is with pretty print. When I print a large map it doesn’t have a new line between keys which makes it a pain to read. I wanted to try puget or fipp but I’m not understanding how to change the configuration.

dpsutton20:01:19

have you toggled pretty printing?

dpsutton20:01:45

also, you can set the width to print if you like

dorianc.b20:01:55

yes that works but I have’t figured how to change it from the built in pprint

dorianc.b20:01:38

This is what my output looks like ' {:arglists ([xs]), :doc "Casts to bytes[]", :added "1.1", :line 5149, :column 1, :file "clojure/core.clj", :name bytes, :ns #namespace[clojure.core], :inline #function[clojure.core/bytes--5400]}, refer-clojure {:arglists ([& filters]), :doc "Same as (refer 'clojure.core <filters>)", :added "1.0", :line 5611, :column 1, :file "clojure/core.clj", :name refer-clojure, :ns #namespace[clojure.core], :macro true}, escape-class-name {:private true, :arglists ([c]), :line 64, :column 1, :file "clojure/genclass.clj", :name escape-class-name, :ns #namespace[clojure.core]}}'

dpsutton20:01:07

and you don't want it to put each key on a new line?

dorianc.b20:01:48

I want it to look like ` :inline #function[clojure.core/bytes--5400]}, refer-clojure {:arglists ([& filters]), :doc "Same as (refer 'clojure.core <filters>)", :added "1.0", :line 5611, :column 1, :file "clojure/core.clj", :name refer-clojure, :ns #namespace[clojure.core], :macro true}, escape-class-name {:private true, :arglists ([c]), :line 64, :column 1, :file "clojure/genclass.clj", :name escape-class-name, :ns #namespace[clojure.core]}`

dorianc.b20:01:22

sorry I mean a new line separating the keys

dorianc.b20:01:59

In that example a new line before the escape-class-name keyword

dpsutton20:01:30

you want key newline value ?

dpsutton20:01:57

i really don't follow what you want sorry

dorianc.b20:01:16

refer-clojure
  {:arglists ([& filters]),
    :doc "Same as (refer 'clojure.core <filters>)",
    :added "1.0",
    :line 5611,
    :column 1,
    :file "clojure/core.clj",
    :name refer-clojure,
    :ns #namespace[clojure.core],
    :macro true},

 escape-class-name
   {:private true,
    :arglists ([c]),
    :line 64,
    :column 1,
    :file "clojure/genclass.clj",
    :name escape-class-name,
    :ns #namespace[clojure.core]}}

dorianc.b20:01:41

Sorry I had to figure out the slack keybindings

dorianc.b20:01:56

that is what I’m trying to achieve but right now it looks like this

refer-clojure
{:arglists ([& filters]),
 :doc "Same as (refer 'clojure.core <filters>)",
 :added "1.0",
 :line 5611,
 :column 1,
 :file "clojure/core.clj",
 :name refer-clojure,
 :ns #namespace[clojure.core],
 :macro true},
escape-class-name
{:private true,
 :arglists ([c]),
 :line 64,
 :column 1,
 :file "clojure/genclass.clj",
 :name escape-class-name,
 :ns #namespace[clojure.core]}}’

dpsutton20:01:46

try your luck with fipp

dorianc.b20:01:26

Yea i couldn’t figure out where to put ` (setq cider-pprint-fn “fipp”)` but I figured it out. It goes in /.spacemacs under user/init right

dpsutton20:01:00

wherever you like to keep you config stuff

dpsutton20:01:09

i don't know where spacemacs puts that

dpsutton20:01:11

but that sounds right

agile_geek20:01:51

~/.spacemacs is the default directory for Spacemacs, it's the equivalent of .emacs.d in emacs.