Fork me on GitHub
#calva
<
2021-11-18
>
cdeszaq19:11:21

I’ve started seeing a strange error from Calva (or something related) recently, and I’m not sure what changed nor where to go to start hunting it down. I’m getting this output in the Clojure Language Client output window whenever any Clojure/ClojureScript file is edited, including Calva’s output / REPL buffer

[Error - 1:47:46 PM] Request textDocument/linkedEditingRange failed.
  Message: No symbol found
  Code: -32602 

pez20:11:03

Do you know what this could be about, @UKFSJSM38?

ericdallo20:11:50

It's this issue: https://github.com/BetterThanTomorrow/calva/issues/1374 IMO, a bug on vscode, not on clojure-lsp

cdeszaq03:11:06

🙂 Thanks for the fast response! I’m glad it is a known issue. From the ticket, it seems the workaround is to downgrade Calva to an earlier version? If that’s the case, is there a simple way to do so? Or perhaps to turn off the toast and stop the Output window from popping up constantly? It seems to be benign, but the visual distractions are… distracting 🙂

ericdallo03:11:47

I think there is a quickfix here of force disabling linkedEdittingRange on calva side c/c @U9A1RLFNV Maybe forcing to not send that capability when initializing server

bringe05:11:05

I’ll try to look into this soon, though I’m pretty busy lately. If anyone else wants to though, much of the clojure-lsp code is here: https://github.com/BetterThanTomorrow/calva/blob/published/src/lsp/main.ts.

bringe05:11:37

Thanks for the info @UKFSJSM38

👍 1
ericdallo03:11:07

I made an attempt https://github.com/BetterThanTomorrow/calva/pull/1389, not sure it fixes all issues, It'd be good to generate the vsix and ask for people with that issue to test

bringe03:11:23

Thanks! The CI for PRs builds the vsix, just FYI. I’m not certain that anyone can access them, though. Here’s the link for the vsix from that PR: https://16086-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.226-pull-1389-ae48b63f.vsix @U02MRUJUREH If you could try that vsix and let us know if it fixes the issue for you, that would be great!

bringe03:11:35

https://github.com/BetterThanTomorrow/calva/wiki/Testing-VSIX-Packages#installing-a-vsix-package <- Here are instructions, in case you aren’t familiar with the process.

cdeszaq03:11:04

Sweet, thanks! I can take a look to see if that fixes things on Monday. Interestingly enough, my machine crashed and after rebooting the problem seems to have gone away. Not sure if something updated behind the scenes or it is due to a race condition, but I’m no longer experiencing the buggy behavior I was before.

bringe04:11:46

That’s weird… but at least the problem is gone 😄.

amar22:11:46

Indentation doesn't seem to work as expected when I hit enter. Have to explicitly tab. I remember seeing something here about a workaround but can't find it now.

pez22:11:09

Is formatAsYouType enabled?

amar00:11:47

yes set calva.fmt.formatAsYouType to true and toggled editor.formatOnType between true and false.

pez11:11:20

How about the setting for new indent engine?

pez11:11:41

Are you using the VIM extension?

amar13:11:05

yes I am using VIM. let me try with that turned off.

amar13:11:16

also using new indent engine

amar13:11:19

ah you're right it's the VIM extension causing the problem

pez14:11:43

There’s an issue about this on Calva, and I think also one on the VIM repo.

pez14:11:13

I think a workaround is to use the not-new indent-engine. Because that is doing a bit like you did manually there, re-formatting the current enclosing form.

amar15:11:24

Thanks for the help! Will try that out.