calva

isak 2025-08-06T19:24:35.150109Z

I notice that when I press Ctrl-backspace on this form, it deletes the whole form instead of the word like it is supposed to. Looks like it is something calva is doing, because I don't get this in a new plain text buffer. Is this intentional?

m/Axis.horizontal
I expected to end up with m/Axis. after hitting that shortcut, like you do in other editors (Cursive, VSCode plain text, etc).

isak 2025-08-06T19:26:14.960479Z

Same thing with Ctrl-Delete, except in the other direction (it deletes to the right of the cursor, instead of to the left.)

JR 2025-08-06T21:08:41.248309Z

Is it possible that you have paredit enabled, and ctrl+delete is bound to Kill Sexp Backward? More info on paredit here: https://calva.io/paredit/

isak 2025-08-06T21:15:28.862389Z

@john.t.richardson.dev I do have paredit on, but I don't think that is it, because this is what I see under keybindings:

JR 2025-08-06T21:18:46.415999Z

If you search for ctrl+delete in keybindings, do you see it also bound to Calva Paredit: Kill Forward to End of List?

isak 2025-08-06T21:20:52.070539Z

@john.t.richardson.dev Oh yea, I think I saw and deleted that one

isak 2025-08-06T21:21:26.453189Z

But that screenshot above is full list of matches for me now

JR 2025-08-06T21:32:24.243979Z

You're right. Even if I remove that entry too, I get the same behavior. And I can see in the debugger that it's invoking killBackwardList

😨 1
isak 2025-08-06T21:33:14.971269Z

Must be a bug, right?

JR 2025-08-06T21:37:44.247789Z

I'm not sure. I tried rebinding Calva's ctrl+delete to a different keybinding and killBackwardList is no longer invoked. But the behavior is still the same

isak 2025-08-06T21:39:28.501159Z

I was thinking the bug is that calva is changing the definition of a word to be a sexp instead, but not sure.

JR 2025-08-06T21:41:45.596839Z

It might be changing something, but it seems unrelated to paredit. With VSCode keybinding debugging on, I see

JR 2025-08-06T21:42:17.445109Z

So it's using the built-in deleteWordLeft

JR 2025-08-06T21:42:42.472629Z

But you're right, if a word could be changed that would do it.

πŸ‘ 1
JR 2025-08-06T21:47:39.175349Z

It might be this, from package.json:

JR 2025-08-06T21:48:37.888309Z

I think you could change that in your settings.json

isak 2025-08-06T21:52:02.879259Z

Looks promising, but for me it acts the same

JR 2025-08-06T21:53:14.585659Z

I haven't tried yet, but a random search shows it would be something like:

"[powershell]": {
            "editor.wordSeparators": "`~!@#%^&*()=+[{]}\\|;:'\",.<>/?",
        }
But not powershell, of course πŸ™‚

isak 2025-08-06T21:54:01.101879Z

wait that worked

isak 2025-08-06T21:54:09.132169Z

wow, nice find!

JR 2025-08-06T21:54:37.513149Z

I don't know that @pez would approve πŸ™‚, seems like a hack

JR 2025-08-06T21:54:43.722349Z

But glad it works!

isak 2025-08-06T21:54:56.431079Z

Appreciate it!

πŸ‘ 1
JR 2025-08-06T21:57:44.556899Z

Just for completeness if someone finds this later. This did work for me in settings.json:

"[clojure]": {
            "editor.wordSeparators": "x",
        }
And now ctrl+delete stops at the x in m/Axis.horizontal

πŸ‘ 1
pez 2025-08-06T22:35:55.456919Z

> I notice that when I press Ctrl-backspace on this form, it deletes the whole form instead of the word like it is supposed to. Looks like it is something calva is doing, because I don’t get this in a new plain text buffer. Is this intentional? Yes. Or, it is a consequence of how we have chosen to define words in Calva defaults. But it is only defaults, and it’s up to the user to go with them or change them. It’s documented here: https://calva.io/customizing/#clojure-defaults

πŸ‘ 1
isak 2025-08-06T22:09:58.164979Z

Does Tonsky formatting work in Calva? Seems like no after trying the instructions here: https://calva.io/formatting/#indentation-rules

isak 2025-08-07T13:47:42.262859Z

@doppiaelle1999 thanks, that one does appear to work

isak 2025-08-06T22:11:50.902199Z

The test code looks like this after formatting for me:

(concat [2]
         (map #(inc (* % 2))
              (filter #(aget sieved %) 
                      (range 1 hn))))

isak 2025-08-06T22:12:57.163679Z

I think this was working at some point.

exitsandman 2025-08-07T05:09:14.848789Z

This one works for me with what IIRC are off-the-shelf configs:

{:remove-surrounding-whitespace? true
 :remove-trailing-whitespace? true
 :remove-consecutive-blank-lines? false
 :insert-missing-whitespace? false
 :indents {#re ".*" [[:inner 0]]}}
perhaps it's the regex