Fork me on GitHub
#calva
<
2021-07-29
>
xavi21:07:42

Hi! When evaluating something like a vector with more than 50 items, the output window only shows the first 50 and then an ellipsis. How to get all the items displayed?

fabrao22:07:21

Maybe you can use REBL

fabrao22:07:41

:rebl {:extra-deps {org.clojure/core.async {:mvn/version "1.3.618"}
                               org.clojure/data.csv {:mvn/version "1.0.0"}
                               org.clojure/data.json {:mvn/version "2.3.1"}
                               org.yaml/snakeyaml {:mvn/version "1.28"}
                               ; com.cognitect/rebl {:mvn/version "0.9.242"}
                               org.openjfx/javafx-fxml     {:mvn/version "15-ea+6"}
                               org.openjfx/javafx-controls {:mvn/version "15-ea+6"}
                               org.openjfx/javafx-swing    {:mvn/version "15-ea+6"}
                               org.openjfx/javafx-base     {:mvn/version "15-ea+6"}
                               org.openjfx/javafx-web      {:mvn/version "15-ea+6"}
                               com.cognitect/rebl  {:local/root "C:\\Trabalho\\Dev\\lib\\rebl-0.9.242.jar"}}
                  :main-opts ["-e" "(->>(Thread/currentThread)(.getContextClassLoader)(clojure.lang.DynamicClassLoader.)(.setContextClassLoader,(Thread/currentThread)))"
                              "-m" "cognitect.rebl"]}

           :nrebl {:extra-deps {rickmoynihan/nrebl.middleware {:mvn/version "0.2.0"}}
                   :main-opts ["-e" "((requiring-resolve,'cognitect.rebl/ui))" "-m" "nrepl.cmdline" "--middleware" "[nrebl.middleware/wrap-nrebl]" "-I"]}
include this in deps.edn and run both

bringe02:07:02

In your pretty printing settings you can set maxLength . https://calva.io/pprint/#configuration If you set it to null I think it will print however many items you want, just be mindful of infinite sequences.

bringe02:07:48

Example configuration:

"calva.prettyPrintingOptions": {
        "enabled": true,
        "printEngine": "pprint",
        "width": 120,
        "maxLength": 200
    }

bringe02:07:26

You may also be able to control the print length dynamically if you wanted, though it may be better to just use the pprint configuration: https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/*print-length*

pez05:07:56

For some use cases it works to disable pretty printing temporarily.

xavi06:07:44

Yes, @U9A1RLFNV it seems that by setting it to null it prints all the items (I also tried removing the maxLength property but then it prints the default 50 items). Thank you all for the tips!

👍 2
fabrao21:07:33

To use Calva with REBL, just start with extra-deps or do I have to start with nrepl ?

bringe02:07:57

It seems that you can just jack-in with an alias with the right extra-deps as in this guide: https://calva.io/rebl/. Let us know if you have trouble with that.