This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-12
Channels
- # announcements (2)
- # bangalore-clj (4)
- # beginners (97)
- # calva (57)
- # cider (24)
- # clj-kondo (1)
- # cljdoc (4)
- # cljs-dev (8)
- # cljsrn (6)
- # clojure (27)
- # clojure-berlin (7)
- # clojure-dev (95)
- # clojure-europe (16)
- # clojure-italy (15)
- # clojure-losangeles (9)
- # clojure-nl (8)
- # clojure-spec (10)
- # clojure-uk (29)
- # clojurescript (25)
- # clojutre (2)
- # clr (6)
- # cursive (33)
- # datomic (20)
- # dirac (1)
- # duct (9)
- # fulcro (2)
- # graalvm (18)
- # jobs (5)
- # jobs-discuss (19)
- # nrepl (4)
- # nyc (1)
- # off-topic (18)
- # pathom (15)
- # re-frame (22)
- # reagent (4)
- # reitit (1)
- # rewrite-clj (9)
- # spacemacs (2)
- # xtdb (12)
I now have created a subscription so that whenever the clojure and vscode tags are used in the same question, I’ll get notified in Telegram. That’ll be once a year, judging by the current activity on SO. 😃
Hello everyone, i'm thrilled to use this extension, but atm I can only use it if I open the repl in my msys2 env, is there a way to automate that with vscode ? without me having to use lein repl
in my msys2 term ?
sure but it says it can't find lein command, I added lein path to Win Path but doesn't work out, it's not recognized as a program since it's a bash file
Executing task: C:\Windows\system32\cmd.exe /d /c lein update-in :dependencies conj [nrepl"0.6.0"] -- update-in :dependencies conj [cider/piggieback"0.4.1"] -- update-in :dependencies conj [com.bhauman/figwheel-main"0.2.3"] -- update-in :plugins conj [cider/cider-nrepl"0.21.1"] -- update-in [:repl-options^ :nrepl-middleware] conj '["cider.nrepl/cider-middleware"]' -- update-in [:repl-options^ :nrepl-middleware] conj '["cider.piggieback/wrap-cljs-repl"]' -- with-profile +uberjar repl :headless <
He does this task but is there a way to make it use bash (included with msys2) instead of cmd ? I think it would work this way
The wiki has some info on using remote and WSL. Not sure how relevant for your case, but anyway.
hi @pez some testing feedback from the latest pre-release build of Cava:
I tested with a project based on the re-frame template: https://github.com/Day8/re-frame-template
I tried using the Cava command Cava: Start a project REPL and Connect (aka Jack in)
but the REPL window doesn't appear (I'm not very familiar with Cava or Visual Studio Code so maybe I'm looking in the wrong place).
The terminal window pops up and the code appears to be compiled correctly. The app is running and I'm able to visit the app url in the browser. Devtools in Chrome shows that shadow-cljs
successfully created websocket and a REPL connections.
There's a message at the bottom of code: Launching a REPL using Leiningen
and Disconnected
One thing to note is that this template uses both leiningen
and shadow-cljs
so that might be the source of the problem. The project.clj
is setup with lein
aliases that call shadow-cljs
like this:
:aliases {"dev" ["with-profile" "dev" "run" "-m" "shadow.cljs.devtools.cli" "watch" "app"]
"prod" ["with-profile" "prod" "run" "-m" "shadow.cljs.devtools.cli" "release" "app"]}
Hope that helps - please let me know if you'd like more details.
@alex-eberts Thanks! This is exactly the kind of feedback we need. I'll fiddle around a bit with the template and see if I can figure out what is lacking.
And. Without having had a look, it seems like a good guess that it is the mix of leiningen and shadow that might trip the process up.
@alex-eberts, Checked it out now. I think it’ll be a bit of work to fix it properly. I’d appreciate if you could file an issue about this. Since it is a template that I presume is pretty popular, we’ll put it on high priority. That said, all is not lost. There is a quirky workaround to get the repl connected: 1. Jack in and choose project type *Leiningen* 2. Choose launch with alias *dev* 3. Skip picking a profile. 4. Wait for shadow to build the app. (Calva will not connect, because reasons). 5. Issue the command *Connec to a running REPL, and choose project type shadow-cljs* 6. Choose build :app**
Quirky, as advertised. 😃 Here’s a way to unquirk it some. Put this in workspace settings.json:
"calva.replConnectSequences": [
{
"name": "Leiningen start REPL",
"projectType": "Leiningen",
"cljsType": "shadow-cljs",
"menuSelections": {
"leinAlias": "dev",
"leinProfiles": []
}
},
{
"name": "shadow-cljs Connect",
"projectType": "shadow-cljs",
"cljsType": "shadow-cljs",
}
]
Then:
1. Jack in and choose *Leiningen start REPL*
2. Wait for shadow to build the app. (Calva will not connect, because reasons).
3. Connect to Running REPL and choose *shadow-cljs Connect*@pez noticed an inconsistency and wanted to confirm (or see if it's configurable) before I file an issue.
when I send the current form to the REPL to evaluate, my cursor stays where it is. when I send the current top level form to the REPL, my cursor moves into the REPL window. 🙂
It is totally strange, because @brandon.ringe fixed so that the cursor stays in the editor. But now that isn’t happening…
I introduced it fixing another issue. Will probably just swap back the other bug for now. because not all bugs are created equal.
https://github.com/BetterThanTomorrow/calva/pull/294/files <- my change was adding true for the preserveFocus?
param (second, optional param) to openReplWindow
Indeed, I don’t know, but I must have merged it away… I am reinstalling it now. And making it even more consistent across commands.
Also, I have fixed the bug with repl window ns being reset. Hopefully less noobish merge this time!

Yeah: Calva 2.0.36 is out. Fixing that #302 bug and also again behaves with focus staying in editor like @brandon.ringe fixed it once.
And it uses cider-nrepl 0.22.1, @gerred, mostly because @slack1038 was less hesitant than I was with that. 😃
@pez Thanks for getting back to me with the workaround - I will certainly file an issue by the end of the day today (PST). 😀👍
@pez will do!