Fork me on GitHub
#calva
<
2023-10-25
>
Ingy döt Net20:10:39

I found a bug and I think Calva is to blame. On a new line in a .clj with Calva enabled type aaa bbb then go to the start of the line and type " and you get "". Try this same thing in any other language file and you just get " (as expected). Turn off calva for the .clj file and you just get ". @pez I think I brought this up a while ago and you said that's just what vscode does, but after testing I think you might be wrong.

pez20:10:19

Do you have autoclosing brackets on for other languages?

Ingy döt Net20:10:24

I'm hitting this all the time. It makes me want to have a hot key to disable Calva for a while for certain types of editing

Ingy döt Net21:10:37

I don't think that matters. I tried this with .clj .pl .py .sh .mk and only .clj with calva types "" when you type a " next to an existing word.

pez21:10:56

I think it matters.

Ingy döt Net21:10:23

can you explain why?

pez21:10:54

Because I think it is the auto-closing brackets feature in action.

Ingy döt Net21:10:58

if I type " on a blank line in any of those files I get "" which is fine

pez21:10:17

I see… Interesting.

pez21:10:41

What is your auto-closing brackets setting?

Ingy döt Net21:10:01

wouldn't this be auto-closing quotes setting?

Ingy döt Net21:10:04

they are both set to languageDefined (default)

pez21:10:46

All this time I have been meaning auto-closing quotes, when I have written auto-closing brackets. 😃 Anyway, it gets important what the language definitions are.

pez21:10:18

Calva defaults to “always” for Clojure. You could set it to something else.

Ingy döt Net21:10:57

Where do I set that for Calva?

Ingy döt Net21:10:08

Couldn't find it

pez21:10:53

See here: https://calva.io/customizing/#clojure-defaults (Could be outdated defaults listed on that page, but you will see the current defaults when you edit your settings.)