Fork me on GitHub
#calva
<
2022-03-04
>
mindbender08:03:56

Something is wrong with EDN editing in my instance of Calva. I keep getting:

Parse error on line 1:
{:lint-as {com.wsscod
-^
Expecting 'STRING', '}', got ':'

pez09:03:33

It doesn't look like a message from Calva. Where does it appear?

Cora (she/her)10:03:16

looks like something is trying to parse ot as json

pez11:03:27

I've seen this problem before...

pavlosmelissinos12:03:16

@U0HJYDTP1 you've actually asked the same question before 😄 Seems to be a VSCode issue https://clojurians.slack.com/archives/CBE668G4R/p1642910250138900

😃 1
mindbender12:03:25

I don't really understand what's going on. The mode for says Clojure, anyway to find out if another program is reading the file?

mindbender12:03:26

And it seems to disappear after a while or after resuming from suspend. But comes back as soon as I edit the file again

Lukas Domagala16:03:27

Strange that it would do anything on .edn files. According to it’s package.json it shouldn’t

1
1
mindbender16:03:41

Why does enter not choose my selection from the suggestion menu when I'm not in a form in the output window but it does choose when I'm in a form ? Is this the normal behavior

mindbender17:03:58

This is the result after enter failed to pick suggestion:

bringe01:03:52

When your cursor is after the last content in the output window, enter will evaluate the form after the prompt.

1
bringe01:03:31

We might be able to use a context for that binding to make it not evaluate when the suggestion window is open. What do you think @U0ETXRFEW?

pez05:03:13

Yes. There's context for that that we can use in the when clause.

1
mindbender06:03:11

@U9A1RLFNV Okay I see that is the reason it works when the cursor is in a form. Thanks

mindbender06:03:33

@U0ETXRFEW eagerly waiting for the context when you can remember it

pez06:03:33

I think it could be suggestWidgetVisible. So if you make the when clause of enter for the command calva.evaluateOutputWindowForm to be:

"calva:keybindingsEnabled && calva:outputWindowActive && calva:outputWindowSubmitOnEnter && editorTextFocus && !suggestWidgetVisible"
That might make it behave correct.

🎉 1
pez06:03:13

Please file an issue on Calva about this, @U0HJYDTP1. So we can fix the defaults. You are of course welcome to provide a PR fixing it.

mindbender06:03:36

@U0ETXRFEW thanks it worked. I will file an issue and see if I can track down the place in the code where it's defined. @U9A1RLFNV thanks for the heads up

👍 1
mindbender06:03:44

On another note regarding the suggest widget is it possible to make tab key cycle the suggestion?

pez07:03:05

It's defined in the extension manifest, i.e. package.json

1
pez07:03:54

I don't know if you can customize how the suggestions are cycled. It's funny how that works differently in all various implementations of it in different systems.

pez08:03:33

Awesome.