Fork me on GitHub

Yes, but then I can’t type “ć” when writing markdown document, for example. They problem is I actually need AltGr.


What I need for special chars is AltGr but not Ctrl+Alt.


There must be a tool for remapping keys.


Being unaware of such a tool, I've made a remapping in this gist:


@slawek098 Can you try that and let us know if it works for you? It will be a bit of a bother for you to keep it in sync as Calva changes, but it is all I can think of right now, short of changing all these in Calva. We have done that before, several times, but we never seem to find anything that is safe from Windows crazyness.


@pez I've temporarily switched to US keylayout just in VSCode window.


But it's really infuriating.


Check that gist out instead, me thinks. 😎

Manuel Ceron09:04:05

Hi everyone! Clojure newbie here! Loving it and also Calva 😄 I have a first small question, is it possible to hide/remove the help section of the repl window:


This is the only way:

Manuel Ceron10:04:50

I guess it works 😄

Manuel Ceron10:04:15

Another quick one, is there a key shortcut to quickly switch focus between editor and repl window?


There should be. But VS Code has commands for switching between windows. On My Mac I can press cmd+alt+left/right to traverse between editors, including the REPL window.


That said. Since you advertise as a beginner, my advice is to use the REPL window as little as possible. This for two reasons: 1. The habit of using top level evaluations withing (comment ...) blocks directly in your files is much more flexible. 2. The REPL window sucks a bit.

Manuel Ceron10:04:20

Thanks for the advice. I try to evaluate directly in the editor as much as possible, but sometimes when the output is large, it's not very practical.

Manuel Ceron10:04:28

so it's handy to evaluate in the repl window


I chose to the hide the REPL window itself. I get what I need from the "Calva Says" window.


The results are also available for copying from the evaluations hover (`cmd+k cmd+i` on Mac).


We'll figure out some better ways to deal with large results. Eventually that REPL window will just be a faded memory. 😃


Dear Calva friends. Today I'm thinking about keyboard shortcuts. Not going to do anything about it yet, but I'm curious about a thing right now. On my Mac a shortcut like ctrl+, (ctrl+comma) is quite available, and easy to press. As is ctrl+. (ctrl+dot). Therefore they are candidates for taking over as the Calva Key. How would that work on your keyboards and systems out there?


Ctrl+, takes me to the VSCode settings, on Windows.


I think it makes sense to have separate key bindings for each OS.


It makes docs awkward to write.


If you decide to go the per OS route, I can help validate the Windows and Windows/WSL1/2 key bindings.


I hope you can consider that even if we don't go that route. 😃


I have generally tried to choose windows-friendly shortcuts, but I do not use Windows myself, so I do not know how well it works. On Mac they work, at least, afaict.


for reference, i had feedback from someone who decided against continuing to use because the paredit bindings clashed with standard windows usage. i agree with hindol that per-os key bindings make sense.


Does vs code have the concept of the “leader” key you can customize per user, as with Vim?


I’d like to be able to customize the “Calva key” or “leader key” but then the second key press could be standard.


But to be honest, I’d apply my Cider shortcuts for most day to day things.


No leader key in vscode, unfortunately.


About Paredit. If you set its keymap to none, it doesn't conflict with anything.


Emacs also lets you quickly remap the meta keys.


Hi! Any suggestions on how I can do some repl customization like in calva's jack-in repl? Should I create a nREPL middleware?


I think it might work to use last suggestion there. In the presence of a launch alias, Calva will not use it's own main args, so you will need to provide those with the alias.


Not sure if I got it correctly, but I tried this:

{:main-opts ["-e"
             "cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}
But it first starts a repl in the terminal window, where I have the expected behavior, but the jack-in doesn't happen. Then after I exit this repl (`ctrl + d`), it starts the nrepl server and do the jack-in.


Maybe you need to start the nrepl server in the eval there?


If you figure this out, I think we can find a way to support this more directly in Calva


This is what Calva uses when no alias is selected at jack-in: -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware].


One thing I run into when developing with containers, my tools decide to restart the container, and so I lose my repl connection of course. But the container comes right back up with the repl on the same port. Any ideas on how to "auto-reconnect" a repl, say within 10 seconds?


I think there is no support for that today. As I happen to know you come from Emacs. Can you do that there? How, if so?


I hadn't run into that particular issue before I switched. Memory is fuzzy, but I'd probably define a hook on repl disconnect (when not intentionally closed), and, say, retry 3 times with backoff.


I've read through the source a couple of times, but I'm still not familiar enough to see exactly how it should work.


Perhaps a setting "retry-on-connection-lost" and then read the config from the repl that just went down, and try it again?


I'm not sure if jack-in would also work for connecting to an already running repl, which is what I end up having to do, as I use to build, test, and inject the yaml into kubernetes. It also sets up port forwarding for the repl, so all I have to do is connect.


I had to put a fake .nrepl-port file so that I didn't have to type the port number every time. I found the setting for specifying the port file, but there isn't one (as far as I can see) that allows you to set a default port.


Should I open a feature request?


Yes, please do. I think there is some reconnection attempts there. But I could be remembering that wrong.


Done: Let me know if there's anything I can clarify or any help I can give. Thanks!


A PR would be nice. 😎


Let me see what I can do.

💯 4