Fork me on GitHub

I've re-enabled hovers in Calva, and I remembered why I turned them off 🙂 I'm editing hiccup in a CLJS file and there's of course a bunch of :divs and such. It looks like the hover provider is giving me as title just div, then the location of the current file, then a literal copy of the source code I'm just editing. Is there a way to turn this off?


I don't think we have a way to disable hovers for keywords. I can recommend setting the hover time to some 1500 ms. (I have 1300 ms). That will allow you to trigger the hovers more at will. The default is way too quick for me and I find myself navigating the with the mouse to avoid hovers.


btw, you should only get the implementation if you press cmd while hovering.


Ah ok, the implementation was then a fluke 🙂


Is this something that merits a setting? Or perhaps disabling altogether? Not sure I see the value, but perhaps there's users of re-frame that want that.


Come to think of it, see if it can be configured in clojure-lsp

Lukas Domagala15:03:49

We could probably filter out a lot of useless hovers by just checking the return value against the hover-text. If they are basically the same we can just not return the hover


We just will have to define ”basically” 😃 I also think this might be a signal to the developer to add docs to their functions, so not sure it is a good heuristic. This particular one looks a bit strange in that it presents a symbol for what is a keyword. Might be a bug in clojure-lsp? cc: @UKFSJSM38


it's espected, but we may want to change to not return hover for simple-keywords


TLDR, even disabling for keywords, I still think hovers are agressive in Calva, it's not the first or second time someone complain to me about Calva showing hovers because the mouse is on a function or var or something like that while user is reading a code

Lukas Domagala15:03:09

I never had problems with it. People should probably disable mouse hovers or increase the delay and use the “show hover” command on a hotkey


Yeah, I don’t think it’s really Calva-related, just VS Code.


There's some connected issue with hovers and evaluation results though - if you show them on hotkey, you then basically can't scroll them as they disappear on mouse move. This might be an ordering issue, eg the evaluation results should probably above the Clojure docs…


I’ve also noticed that results are below other hover info. @U0ETXRFEW Can we make results appear at the top?

Lukas Domagala22:03:21

switching the order around isn’t usually hard, I just played a lot with the hover provider. But I somehow can’t find where the eval hover comes from 🙂 Doesn’t seem to be set in the hoverProvider


Let's bring the results to the top. Or at least try to. Please create an issue for it.


I am now constantly seeing Calva unused public var but indeed it is used in other parts:


Usually result of stale LSP, try "Developer: reload window"


I'm working on a version of Calva where it will be possible to restart clojure-lsp w/o reloading the entire window. Here's a VSIX: (Early build, but it seems to work when I test it.)

🎉 1

A lot of users do not realize that they can change the mouse hover time, or configure hovers to only show on demand. I'm thinking I should make a short video about it and mention it in the docs. It doesn't really belong in the Calva docs, but we have some of that already since it has helped us with providing a bit less of VS Code support. Are there any more settings like this I should consider in the video?

👍 2

Mentioning this hover timer at work has gained me a lot of gratitude.

Lukas Domagala15:03:41

"editor.snippetSuggestions": "top" //will be better once I'm done with the lsp/repl completion merge


Funny, I also thought about the pretty printing options. Might make a good video on its own. There are a bit of details around it that is good to know about.


Especially the “accept on enter” thing


It's happening all the time: parameters passsed in maps as keywords: :foo-id. Destructure inside a let or a function as foo-id. Hit enter, autocomplete to :foo-id again :/

Stefan T00:03:57

Agreed, I feel like vscode’s default hover time is frustratingly short. Increasing it was a huge improvement.


To me it looks like that redditor should be using Notepad. 😃

Lukas Domagala13:03:59

Yeah, I agree with the first comment on that post: give me as much help as possible, I’m not a professional compiler 😛


Dear Calva friends. Here's a PR adding some clojure-lsp process management. It would be awesome to get some help testing it. There are many cases and states here that I could have gotten wrong. See the PR for a description of the changes. • PR: • VSIX:

nice 2

Hi guys, I tried Calva debugger and I like it so much, it is very useful but for some reason Step into doesn’t work for me. I instrumented some function and when I try to go inside another function it is stuck and nothing happens. I use Instrument Top Level Form For Debugging


Hello. Please create an issue and include example code that can be used to reproduce this. It sounds like maybe the breakpoint finding logic is having some issue.


To see if we have introduced the breakpoint finding problem recently, please also also try with Calva 2.0.249 and see if that version behaves correctly.