Fork me on GitHub
#calva
<
2022-03-14
>
orestis10:03:49

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?

pez10:03:10

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.

pez10:03:23

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

orestis11:03:15

Ah ok, the implementation was then a fluke 🙂

orestis11:03:04

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.

pez11:03:05

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

pez15:03:48

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

ericdallo15:03:50

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

ericdallo15:03:00

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

1
bringe16:03:13

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

orestis18:03:07

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…

bringe21:03:45

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

pez06:03:04

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

pinkfrog14:03:46

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

orestis14:03:25

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

pez14:03:48

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: https://19430-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.254-1592-stop-start-clojure-lsp-5fcf9853.vsix (Early build, but it seems to work when I test it.)

🎉 1
pez15:03:18

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
pez15:03:03

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
"calva.prettyPrintingOptions"

pez16:03:54

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.

orestis18:03:57

Especially the “accept on enter” thing

orestis18:03:30

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.

pez13:03:52

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 😛

pez21:03:18

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: https://github.com/BetterThanTomorrow/calva/pull/1595 • VSIX: https://19438-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.254-1592-stop-start-clojure-lsp-ac03861f.vsix

nice 2
Taras23:03:06

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

bringe03:03:32

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.

pez06:03:37

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.