Fork me on GitHub
#calva
<
2021-11-01
>
ericdallo01:11:03

I noticed calva code actions are not working on my vscode for some reason, I then tested on a friend's machine and the same happened, maybe something broke on recent versions? 🧵

ericdallo01:11:27

I tested version 2.0.222

ericdallo01:11:35

to test that: 1. move cursor to a function name 2. ctrl/command + . 3. select cycle-privacy 4. nothing happens...

ericdallo01:11:57

But if I manuallt call command Calva refactor cycle privacy it works

ericdallo01:11:28

so it's not regarding clojure-lsp since the code actions just call the existing commands, and when selecting the code action I can't see anything on clojure-lsp logs

ericdallo01:11:56

it's some vscode/calva bug when executing code actions not even calling it

ericdallo01:11:58

I confirmed that rolling back vscode-languageclient from 7.0.0 to 6.1.3 fixes the issue 😔 I tried using the most recent version as well but it didn't fix the issue unfortunately

ericdallo01:11:44

that's weird though, I tested dart-code vscode extension which uses the same 7.0.0 version and code actions work perfectly, maybe some missing flag on calva?

ericdallo02:11:48

Well, I debugged calva code and didn't find anything wrong, maybe a vscode-languageclient bug, I checked how https://github.com/Dart-Code/Dart-Code/blob/master/src/extension/analysis/analyzer_lsp.ts does and everything seems correct on calva.

ericdallo02:11:00

It'd be good if someone confirm the issue as well

Stuart09:11:49

Just tried it this:

to test that:

move cursor to a function name
ctrl/command + .
select cycle-privacy
nothing happens...
Can confirm nothing happens, but doing it via command pallette works

ericdallo12:11:32

Yeah, sounds like a general calva bug so, c/c @pez

pez12:11:59

Something changed between the language client versions that Calva isn’t prepared for, it seems. Please file an issue.

bringe16:11:36

This may be related to some issue(s) I saw when I tried to update the client before. I can’t remember what I saw, but it seemed like there was some issue when I tried.

pez16:11:09

What you saw could be unseen? 😂

bringe02:11:18

I’ve seen too many things to remember them all 😄. Next time we update the client we probably should do more extensive testing of lsp functionality before we merge.

ericdallo03:11:05

yeah, the issue is really odd, I really have no idea why same lib version works good for Dart-Code but not for Calva 🤷

ericdallo03:11:17

I don't see calva doing anything special regarding code actions

bringe03:11:52

@UKFSJSM38 Would you mind creating an issue with some details about this?

ericdallo03:11:49

sure, I'm fixing some clojure-lsp CI issue and I can create after that

pinkfrog14:11:28

Hi @pez, saw your comment there: https://github.com/BetterThanTomorrow/calva/issues/1370#issuecomment-956262633. What do you mean by no such trick is needed?

pez14:11:27

Calva has a few convenience features for Rich Comments: 1. Forms immediately inside them are treated as top level forms. So alt+tab anywhere inside such a form will evaluate it. There is no need to place the cursor with precision. Thus when Sean in that video says that the trick will make it easier to “get at the forms inside”, I’d say it can’t get easier than alt+tab 😃 2. Still, it can be easier to “think” inside Rich comments if you can move the folding paren away, without it jumping back up when you format. So Calva supports that: https://calva.io/rich-comments/#thinking-space-is-kept 3. Calva has a command for creating a new Rich Comment block and it will create one, opened like that. So if Sean had recorded that today, he could have just used that command instead ctrl+alt+r c.

thanks3 1
pez14:11:58

And, as I say in that ticket, the trick as such doesn’t work in Calva anyway. A format of the form will remove the comma.

pinkfrog14:11:23

Thanks for the detailed reply.

🙏 1