Fork me on GitHub
#calva
<
2023-06-14
>
Alexander Kouznetsov23:06:36

Two things are happening often to me in calva: 1. When I use code completion, for example, I type namespace-foo/get-bar and then autocomplete it to namespace-foo/get-bar-by-id , what I end up getting in editor is something like namespace-foo/get-barnamespace-foo/get-bar-by-id.

Alexander Kouznetsov21:06:25

What does 🧵 icon mean?

pez05:06:01

Yeah, not super clear, I’m sorry. 😀 It means that I want you to keep your question together in a thread, rather than spread it out s as several channel level posts.

👍 2
Alexander Kouznetsov18:06:13

Got it, will do next time. Wasn’t sure if it made sense to have them in one thread since they might be having a different explanation.

pez19:06:34

That makes sense. It’s a bit crude with the Slack threads.

Alexander Kouznetsov00:06:03

Hmm, looks like nobody has anything like that, so must be something in my setup.. Will investigate..

Alexander Kouznetsov18:06:49

I did a bisect which identified https://github.com/zxh0/vscode-proto3/issues/161 as the source of the problem even though I’m not 100% sure that’s the case. It stopped reproducing but when re-enabled that extension it was still not reproducing. It might be the case that the ordering of initialization or something like that affects it.

Alexander Kouznetsov18:06:09

I’m also not convinced that bisect works correctly when you investigate issues in an extension since you have to say “All good” when Calva extension is not selected and that possibly marks other extensions as good even though we don’t know that.

pez18:06:34

Worst kind of bug. I guess it could still be that it exposes an error in Calva rather than being the cause of the bug.

Alexander Kouznetsov01:06:34

Nah, getting the same behavior again even though I removed that extension. Peter, do you know a way to bisect by keeping your extension enabled?

pez07:06:47

All I can think of is disabling all extensions except Calva, confirming that you don’t have the issue there. Then enable one extension at the time, until the problem shows up. Then disable all except Calva and the last extension you enabled. If the problem isn’t there, enable one extension at the time… and so on. It won’t work if the problem is intermittent. Consider using VS Code Insiders for the experiment. If you haven’t used it before, it will start from a clean slate. The problem you have might be some bad state in VS Code.

gratitude-thank-you 2
Alexander Kouznetsov23:06:53

2. When I use inline rename operation (i. e. F2 while cursor is on the var name), I sometimes get garbage because, I guess, the state of the clojure-lsp is out of sync with the current editor content and it is modifying code somewhere close to where the var is used, but sometimes on a different line or something like that.

🧵 2
Alexander Kouznetsov23:06:38

3. And actually one more thing is that sometimes I control click on a var like namespace-test/get-test-by-id around the test part and I get clojure.test opened or something like that, maybe when clicking around get it navigates to clojure.core/get or something that matches a part of the var name. I haven’t seen this happening in the previous calva versions.

🧵 2
Alexander Kouznetsov23:06:38

Has anybody else seen something like this?

🧵 2
ericdallo00:06:54

Is it possible to provide a project that happens and your calva output showing LSP version?

Alexander Kouznetsov21:06:18

Project is in private repo, so can’t share it. Here is the LSP version:

Calva version used: v2.0.369
clojure-lsp version used: 2023.05.04-19.38.01
clj-kondo version used: 2023.04.15-SNAPSHOT
clojure-lsp version used: 2023.05.04-19.38.01
clj-kondo version used: 2023.04.15-SNAPSHOT