This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-24
Channels
- # announcements (1)
- # beginners (113)
- # calva (16)
- # cider (6)
- # cljsrn (1)
- # clojure (104)
- # clojure-argentina (2)
- # clojure-dev (3)
- # clojure-italy (1)
- # clojure-nl (10)
- # clojure-spec (6)
- # clojure-uk (4)
- # clojuredesign-podcast (44)
- # clojurescript (25)
- # core-async (2)
- # datomic (21)
- # emacs (14)
- # events (1)
- # figwheel-main (12)
- # fulcro (7)
- # joker (2)
- # leiningen (1)
- # mount (7)
- # music (1)
- # off-topic (16)
- # pedestal (3)
- # re-frame (8)
- # reagent (8)
- # reitit (11)
- # shadow-cljs (4)
- # spacemacs (16)
- # sql (1)
- # tools-deps (14)
- # vim (1)
Here is a demo using an example from https://clojuredocs.org/clojure.pprint/pprint
To evaluate big-map
I used ctrl+enter
I'll open an issue specifically for pprint in the repl window if you want. I don't see one for that currently.
Yeah, please open an issue about pretty print in the repl window. I think fipp is used there, but I'm not sure. And maybe we should use pprint all over.
I was adding REBL to my development flow with Calva. I got the setup working but I noticed that I cannot do “Go to definition” and other similar features in Code anymore. I start the Jack-in with the following aliases in my deps.edn:
;; nREPL with REBL
:nrepl-rebl {:extra-deps {nrepl {:mvn/version "RELEASE"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware" "[nrepl-rebl.core/wrap-rebl]"]}
;; REBL
:rebl {:extra-deps
{org.clojure/clojure {:mvn/version "1.10.0"}
org.clojure/core.async {:mvn/version "0.4.490"}
com.cognitect/rebl {:local/root "/Users/janne/Dev/REBL/REBL-0.9.218.jar"}
org.openjfx/javafx-fxml {:mvn/version "11.0.1"}
org.openjfx/javafx-controls {:mvn/version "11.0.1"}
org.openjfx/javafx-graphics {:mvn/version "11.0.1"}
org.openjfx/javafx-media {:mvn/version "11.0.1"}
org.openjfx/javafx-swing {:mvn/version "11.0.1"}
org.openjfx/javafx-base {:mvn/version "11.0.1"}
org.openjfx/javafx-web {:mvn/version "11.0.1"}
nrepl-rebl {:mvn/version "0.1.1"}}}
With this setup I’m getting the REBL window and Calva’s nREPL connection. The REBL and nREPL are also synced, meaning that I see the evaluated values inlined in Code and also in REPL. The setup is otherwise ideal, but I would like to get the code navigation working again. Is this possible or have I done something silly with my configs? 😅I noticed that the code navigation has something to do with starting the nrepl with :main-opts ["-m" "nrepl.cmdline"]
option. If I that opts the code navigation breaks
This is a longshot, but maybe it is because nrepl-rebl brings in nrepl 0.5.2. Not sure how you would test that guess...
Okay thanks for the insight. I’ll try another library that syncs nrepl and rebl. It might use newer nrepl :thinking_face:
There might be a way to exclude the dependency. Or just try using a local version of the library where you remove the dependency.
I am far from sure about it as well, so there might be something else that needs fixing. You are welcome to add this as an issue on Calva. It would be awesome to be able to support REBL workflows.
I got my setup working by starting the repl first from the command line clj -A:nrepl:rebl -m nrepl.cmdline --middleware '[nrebl.middleware/wrap-nrebl]' -i
and then hooking Calva to it. I changed the nrepl-rebl syncing middleware to a more active looking library.
And I had in my deps.edn:
:nrepl {:extra-deps {nrepl {:mvn/version "0.6.0"}}}
;; REBL
:rebl {:extra-deps
{org.clojure/clojure {:mvn/version "1.10.0"}
org.clojure/core.async {:mvn/version "0.4.490"}
com.cognitect/rebl {:local/root "/Users/janne/Dev/REBL/REBL-0.9.218.jar"}
org.openjfx/javafx-fxml {:mvn/version "11.0.1"}
org.openjfx/javafx-controls {:mvn/version "11.0.1"}
org.openjfx/javafx-graphics {:mvn/version "11.0.1"}
org.openjfx/javafx-media {:mvn/version "11.0.1"}
org.openjfx/javafx-swing {:mvn/version "11.0.1"}
org.openjfx/javafx-base {:mvn/version "11.0.1"}
org.openjfx/javafx-web {:mvn/version "11.0.1"}
rickmoynihan/nrebl.middleware {:mvn/version "0.2.0"}}}
And then I called (cognitect.rebl/ui)
in Calva’s REPL to get REBL window
This setup is great for my workflow ❤️ I’m not going to open a new issue because I saw this feature request in Github: https://github.com/BetterThanTomorrow/calva/issues/240. I think it summarizes quite well how I would like this setup be improved 🙂
I got something wrong with my setup that I described above (it’s not working correctly). Here I described the situation and how I got it solved: https://github.com/BetterThanTomorrow/calva/issues/240#issuecomment-525437286