Fork me on GitHub
#calva
<
2021-07-16
>
Trey04:07:10

any extension recommendations for Emacs-like keyboard shortcuts in VSCode?

Cora (she/her)04:07:57

and if you go into vscode's extensions search and enter:

@sort:installs @category:"keymaps" emacs

Cora (she/her)04:07:10

you should see a bunch of options

Cora (she/her)04:07:06

and I'm impressed by the length they went to in order to make ctrl+g work a lot of places

Trey16:07:27

thanks for the recommendations! I’ll try out the “awesome” one

partywombat 2
dgb2307:07:26

Not sure if this is a calva or a VSCode question but typically processes in the integrated terminal are killed when closing the VSCode window on macos. I had several instances of REPL processes lingering after I closed VSCode. • am I doing something wrong? • is this something I deal with manually? • is this an issue with VSCode or Calva than can be resolved?

pez08:07:01

It could be the feature where VS Code detaches and reattaches terminal sessions when closing and reopening a workspace. There might be a setting to disable this. And maybe Calva should have a way to deal with it. To manually kill the jack-in process, press ctrl+c in the jack-in terminal.

👍 2
dgb2307:07:33

To clarify I typically use the Jack-In command to start a REPL

dgb2307:07:19

and just a deps.edn for most of what I do, no other dependecy/build tools or anything like that

Cora (she/her)17:07:15

I wish there was a command to kill the repl, sometimes I just want to shut it down

pez18:07:38

If you started the REPL with Calva, you can jack in again. It will kill the REPL and start it anew. However, if you often have the need to kill the REPL, you might benefit from asking why.

Cora (she/her)18:07:24

sometimes I just want to shut it down because I'm working on other stuff in a polyglot codebase and I don't need it running using energy

Cora (she/her)18:07:46

it happens frequently (daily?) in one of my codebases at the moment

Cora (she/her)18:07:44

I'm mostly doing frontend work in typescript but sometimes need to spend an hour or two adding something to the clojure backend and could use a repl

Cora (she/her)18:07:59

but once I'm done with the repl I don't want to leave it running indefinitely, I'm unlikely to need it for a long while

pez18:07:14

If you started the REPL with Calva, you can press ctrl+c in the jack-in terminal.

Cora (she/her)18:07:15

ohhhh cool, that's good to know

Cora (she/her)18:07:29

I've been using system exit

pez19:07:26

System exit works too. 😃

practicalli-john23:07:00

I prefer to run the repl process in a terminal and therefore it's easy to stop or restart the repl regardless of editor. Calva can then connect to this external repl process. If the editor has to restart, it does not affect the running repl process. Therefore it's a more robust approach It's a shame this approach is described in less than positive terms in the Calva docs.

Cora (she/her)00:07:06

don't jack-in functions typically load support functions and stuff into the repls they start to make integration smoother?

Cora (she/her)00:07:34

I thought cider did that with something in order to allow resetting namespaces easily

practicalli-john06:07:14

Jack-in adds a few libraries to the command that it calls to start an external repl process and connect. This is the same command, i.e. lein or clojure, that you would run in a terminal. For Leiningen you would add those libraries to the dev profile. For Clojure CLI you would use an alias.

practicalli-john06:07:07

Leiningen already starts nRepl, so the clder-nrepl library is required to allow cider-based editors (Cider, Calva, Conjure) to communicate with the nRepl server. For Clojure CLI, nRepl and cider-nrepl should be added, which I have in several aliases to start the Repl with additional tools such as visual data browsers

pez06:07:35

To support starting the REPL process in a terminal, Calva has a command for copying the jack-in command line to clipboard. However, VS Code has neer needed a restart for as long as I have been using it. And also it keeps your terminal sessions between restarts anyway.