Fork me on GitHub

New Calva out Thanks @domagala.lukas for spearheading this new Calva-as-a-LEGO-brick direction!

🎉 4
calva 3

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).


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.


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


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

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

This might be the closest issue. A separate issue might be called for.


Could docstrings not be hovers?


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


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


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.


I think output window is too raw, maybe @U0HG4EHMH something like this:


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

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

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.


@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.


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


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


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

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.


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

☝️ 1

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.


@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?


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.