Fork me on GitHub
#calva
<
2022-08-07
>
john02:08:22

Hey folks, sorry if this is obvious, but wrt keybindings, I'm seeing this in the docs:

Bind calva.runCustomREPLCommand to a shortcut with whatever code you want to evaluate in args key.
Should I be doing that binding in keybindings.json? Or within the snippet itself?

john02:08:07

Dropping this in the snippet: "calva.runCustomREPLCommand": "ctrl+shift+i", doesn't seem to work. https://scicloj.github.io/clay/#Calva, I'm seeing a different syntax than in the docs. Did the correct way to do keybindings change?

john02:08:23

Reading this > Bind calva.runCustomREPLCommand to a keyboard shortcut referencing the key of one of your calva.customREPLCommandSnippets Maybe I should have a "commands" collection in my settings.json and it goes in there?

seancorfield02:08:20

I would expect that to go in keybindings.json

👀 1
john02:08:03

Thanks @seancorfield, it worked! lol I've been pulling my hair out today, trying to figure out how to port cider's debugger over to CLJS so it'll work in CLJS using inmesh's https://github.com/johnmn3/inmesh#stepping-debugger. Using just keyboard shortcuts though, this ain't bad!

john02:08:51

Would be nice if the ctrl-l results also showed up inline, like normal evals do

john03:08:06

Also haven't got the hover eval working yet - that'd be cool

john03:08:30

to just hover over a symbol to see what it's local value is during the break

Lukas Domagala03:08:20

I think most of us aren’t really using the debugger much, so it’s not evolving as fast as the rest of the features 🙁

john03:08:37

Yeah, I rarely use it. I guess it's a nice-to-have though

john04:08:07

So, if I understand this correctly: > A new experimental feature lets library authors ship snippets inside their jar files. I can only export :customREPLCommandSnippets and :customREPLHoverSnippets and not explicit keyboard shortcuts, like ctrl-i. So they can only be accessed via ctrl+alt+space and then the key command (or the quick-pick menu) right?

john04:08:27

Looks like the hover snippets only work in workspace settings and not user settings

Lukas Domagala11:08:48

Yes and yes. I think I kind of forgot to look for them in the workspace configuration 😅

Lukas Domagala11:08:48

Setting shortcuts is kind of difficult in vscode extension code. What you can do is set a hot key for the custom snippet and a key top open the snippets. This way you'll have a two level hotkey

🧵 2
john16:08:55

Yeah, the two level thing is a little alien to my muscle memory, but I'm def not complaining. This is fantastic stuff all around. And it might be a little risky anyway, letting any jar set arbitrary keyboard shortcuts transparently.

🧵 2