Fork me on GitHub

Hi, I’m just starting out with Calva, it looks great so far! I’m trying to get Calva to open reveal automatically once I jack-in, but I can’t get it working. I’ve added an alias to my .clojure/deps.edn as described here: When I jack-in and select the reveal-nrepl-middleware alias, the reveal window does not appear. I’ve also tried adding (do (require '[vlaaad.reveal]) (vlaaad.reveal/ui)) to afterCLJReplJackInCode . This opens the reveal window automatically, but evaluated expressions do not appear in the reveal window. Any tips?


I haven't used reveal, but do you see any errors in the repl output? Feel free to create an issue with repro steps and details like your OS, JDK version, and Calva version so we can investigate.


clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.8.3"},cider/cider-nrepl {:mvn/version,"0.25.8"}}}' -A:add-libs:reveal-nrepl-middleware:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"
WARNING: When invoking clojure.main, use -M
nREPL server started on port 49526 on host localhost - 
This is the output I’m getting. No errors, but I do see a WARNING about invoking clojure.main


I see. What about in the output.calva-repl window?


A I think I see the error: ; Starting Jack-in Terminal: clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.8.3"},cider/cider-nrepl {:mvn/version,"0.25.8"}}}' -A:add-libs:reveal-nrepl-middleware:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" The --middleware is different from what I have in the reveal-nrepl-middleware alias in my deps.edn:

:reveal-nrepl-middleware {:extra-deps {vlaaad/reveal {:mvn/version "RELEASE"}}
     				      :main-opts  ["-m" "nrepl.cmdline"
                  					   "--middleware" "[vlaaad.reveal.nrepl/middleware,cider.nrepl/cider-middleware]"]
                  		  :jvm-opts ["-Dvlaaad.reveal.prefs={:font-size,14,:theme,:light}"]}
Could it be that Calva overwrites this setting somewhere?


Hmm. Is that in your project deps.edn or ~/.clojure/deps.edn? Not sure if that matters here, but @U0ETXRFEW probably knows more about this middleware thing.


This is in my ~/.clojure/deps.edn there are no conflicting aliases in my project deps.edn


@U9A1RLFNV Might be better if I file an issue on Github I guess?


There are some (closed) issues there already. Maybe you can find some help there. Just a moment.


If info from that issue doesn't help, please file a new one.


@U0ETXRFEW Will jack-in use the middleware from the :main-opts of an alias, or is it required to start the repl manually then connect?


If Calva knows that an alias provides main-opts then it won’t use the default middleware. That would mean that for @U56R03VNW’s jack-in to work, the alias needs to be in the projects deps.edn file. (Calva does not read user deps.edn files.)

👍 3

@U56R03VNW file an issue about this, I think. We should either document this clearly or add functionality to Calva to handle this more directly.


New attempt to get deps.edn jack-in work on Windows even when Calva is run from a path containing spaces. @cb.lists And if other windows users want to help test it as well, that would be swell. deps.edn jack-in and the standalone repl starts should both still work, or I have broken something:


New version of Calva just released, with this content: • Fix, thanks @plexus! Please try the Standalone REPL thing and let me know if there are problems with it. Same with the standalone connect. Both should work without any project opened. (The Getting Started stuff I’ve been posting about is not part of this release.)


This should fix the story with starting up a Calva REPL as easy as a prompt REPL, @U064X3EF3, and also lays the foundation for taking that experience a step further, which is work in progress.


I couldn't find documentation about "calva.jackInEnv": {  } settings


This is all documentation there is about it: Maybe a bit scarce, but I’m not sure what more there is to say about it…

parens 3

actually I am looking a way to make this default


Default how?


Easiest way to connect to a running project repl is to use that commad directly. Default keyboard shortcut is ctrl+alt+c ctrl+alt+c.


everytime I connect to repl I need to answer same questions and like last 9 months I never chosed something else. so I thought maybe there is a way to chose them by default and with one click I can connect to repl


ctrl+alt+c ctrl+alt+c is nice but how about next questions lets say can I just make "app" default or "shadow-cljs"


I think it would be amazing If I can create project settings "default repl method" and connect to repl with one shortcut


That’s what the custom connect sequences are for:


And about that Getting Started REPL, here’s the PR to follow for that:


this zip doesn't contain .vsix file do I do something wrong ?


Clicking that link above should download a .vsix file for you. It did for me. Does it not for you?


I got a zip:


I've manually convereted .zip to .vsix I got an error




I mean just changed extension (converted was wrong word)


You should get away with just changing the file extension.


What was the error you got?


Strange. I'm afk and can't test this myself. Let's see if someone else can. Never had that happen before...

✔️ 3

@UJ35GLZU7 I just downloaded that on Windows, got the zip, changed .zip to .vsix, and then in VS Code > Extensions > ... > Install from VSIX... and selected the newly renamed .vsix file and it installed fine for me.

❤️ 3

Maybe the file got corrupted in your download @UJ35GLZU7. I just tried it (on Mac, but anyway) and vscode happily just uses it.


again I got Element 'Identity' has invalid value for attribute 'Version' ---> System.FormatException: Input string was not in a correct format. but np I'll wait normal release 🙂


Frustrating. I was hoping to get a tester on the new feature. I’ll post a new VSIX link and maybe that one will work.