Fork me on GitHub
#calva
<
2023-06-16
>
angrygami09:06:58

Hi, Does anyone know how to start babashka REPL via WSL (without running entire VSCode in WSL). I.e. currently, when I start REPL I see it does something like:

bb --nrepl-server 59167
And I want it to do:
bash -c 'bb --nrepl-server 59167'

borkdude09:06:34

Do you mean via the Terminal in VScode?

angrygami09:06:26

No, I mean via command palette

borkdude09:06:09

Maybe: wsl -e "bb"

angrygami09:06:04

Hm... I think I wasn't clear enough :) I want Calva to start my REPL, but with slighly different command

borkdude09:06:13

yeah, bash -c seems to work better

borkdude09:06:29

ok, sorry, don't know enough about Calva, I'll step back :)

pez09:06:22

I can step in. 😃 The customJackInCommandLine option of the https://calva.io/connect-sequences/ should be able to cover this.

angrygami09:06:13

Well, I saw this and didn't understand how can I acheive what I need with that, that is why I'm here asking :)

pez09:06:03

Settings like this, should do it:

"calva.replConnectSequences": [
        {
            "name": "BashBB",
            "projectType": "custom",
            "customJackInCommandLine": "bash -c 'bb --nrepl-server JACK-IN-NREPL-PORT'",
        },
    ] 
The JACK-IN-NREPL-PORT will be replaced by a random high port that Calva “reserves”.

💡 2
angrygami09:06:45

Works perfectly! Thanks

🙏 2
pez09:06:42

Note to self (and @U9A1RLFNV): We could add this example to http://calva.io, as it is probably quite generally useful.

bringe03:06:39

Issue created for that ^ simple_smile

🙏 2
pez10:06:13

Issue fixed. 😃

🎉 2