Fork me on GitHub
#calva
<
2022-02-20
>
pez08:02:10

New Calva out https://twitter.com/pappapez/status/1495311636495745025 Thanks @domagala.lukas for spearheading this new Calva-as-a-LEGO-brick direction!

🎉 4
calva 3
phill13:02:11

Can I prevent docstrings from popping up? My program is full of function calls, so it is a minefield from the docstring perspective. There sometimes seems to be hardly any place on the screen to hide the mouse without stirring up a box that obscures the program I am trying to edit. But I like the lint messages! I found how to delay the popup, but what I would like to do is get lint messages right away and totally suppress popups of facts about correct lines of the program (or divert them to a fixed space, like Emacs' mode line).

pez13:02:31

There is no setting for this. What you can do is delay the hover and use an extension like Error Lens that shows lint errors as decorations on the lines where they happen.

pez13:02:41

Personally I think Error Lens is a bit overwhelming. So I often keep the Problems panel somewhere visible.

ericdallo15:02:39

The hover showing up all the time is really something annoying, I was using calva last week and that is really making things hard during development :( This is hot related with errors/warning @U0ETXRFEW as the hover popup show everytime you hover over any symbol. Maybe we should have a flag to only show hover information when a keybinding is pressed or something like that, at least this is how Emacs behave

yes 1
pez16:02:42

That’s not something Calva can do. It's something to check the vscode issues for. The user can disable hovers or delay them. I have mine delayed at 1500 ms. That lets me choose when to peek at a hover.

👍 1
pez16:02:26

This might be the closest issue. https://github.com/microsoft/vscode/issues/3130 A separate issue might be called for.

phill12:02:49

Could docstrings not be hovers?

pez12:02:10

Not following the question, @U0HG4EHMH. Can you elaborate some?

ericdallo12:02:44

I think he meant if could docstring be presentend in somewhere else than those hovers popups

pez12:02:56

I guess they could. The user can add a command snippet that prints them to the output window, for instance. Calva itself tries to do things the VS Code way. That's by design, so that users should be able to leverage VS Code knowledge.

ericdallo12:02:45

I think output window is too raw, maybe @U0HG4EHMH something like this: https://github.com/emacs-lsp/lsp-ui#lsp-ui-doc

bringe03:02:44

I’m not sure if VS Code allows for something like that ^, but it would be nice if we could just show information in a small frame like that, over any other window, and control its position.

☝️ 1
pez13:02:01

Can't be done in VS Code. You can create a web view like we did with the old REPL window. But at that point it could be better to use Portal.

emacs 1
😛 1
phill17:02:55

For comparison - for Java in VS Code, I use "Java language support" from Red Hat. The javadocs do not pop up in hovers. For docs, I visit the website or go-to-definition. I would like to configure Calva to work this way.

pez19:02:16

@U0HG4EHMH You can provide a PR that stops Calva from providing docs in hovers on a setting. We will consider it. My default stance on settings is to avoid them, though. I do wonder if this particular setting will be worth the weight it adds. We won't be able to stop the hover from popping up if something else is providing hovers information.

ericdallo19:02:58

Since we can disable it from vscode settings, I'm ok disabling it from there

bringe02:02:41

Oh, so hovers can be disabled in the settings. That should cover what @U0HG4EHMH wants, I think?

pez04:02:54

Except that hovers also display linting information, which will have to be found elsewhere if hovers are disabled. Such as in the problems pane, or as decorations using Error Lens.

☝️ 1
👍 1
phill16:02:55

Yes, my dilemma is that I love Calva's lint hovers. There are only a few of them in a nice neat program, they are mostly worthy of attention, and then they go away when addressed. Docstrings, on the other hand, are not problems, and not usually relevant to the task; yet they are very numerous, especially in Clojure, where even "if" and "for" have them. I must devote concentrated effort to position the mouse, on my small screen (or big screen with large type?), in a place where my focus won't be shattered by a docstring hover. Therefore, I would like to find a way to "demote" docstrings to a "less than emergency" form of delivery, perhaps even non-delivery.

pez16:02:18

@U0HG4EHMH Did you try delaying the hover to 1500 ms? For me that completely lets me bring up hovers on demand.

☝️ 1
pez17:02:21

Can't see a way to disable docstrings popups in Java either. But there are a lot of settings so I am probably just not seeing it.

phill17:02:02

@U0ETXRFEW a modest delay is definitely optimal, but I did not understand the "on demand" aspect: if I set the delay to 84200 seconds to avoid docstrings, is there something I could do to get a lint hover to appear sooner?

pez21:02:30

I mean that 1500ms gives me time to hover over something or to not do it. With the default of 300ms there were hovers popping out all over.