Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable hover in editor #19988

Closed
misantronic opened this issue Feb 5, 2017 · 19 comments
Closed

Disable hover in editor #19988

misantronic opened this issue Feb 5, 2017 · 19 comments
Labels
editor-contrib Editor collection of extras feature-request Request for new features or functionality
Milestone

Comments

@misantronic
Copy link

  • VSCode Version: 1.9.0
  • OS Version: macOS 10.12.2

Steps to Reproduce:

  1. Write a function
  2. Reference it somewhere
  3. Mouse-Hover the function pops up a little box with informations

Just as described in https://code.visualstudio.com/docs/editor/editingevolved#_hover

Is there a way to disable it or at least set a delay?
I find myself in many situations where this just blocks my view.

@bpasero bpasero added feature-request Request for new features or functionality editor labels Feb 6, 2017
@alexdima
Copy link
Member

alexdima commented Feb 6, 2017

Unofficial (hence the squiggle you'll get), but here goes: "editor.hover": false

@alexdima alexdima added this to the Backlog milestone Feb 6, 2017
@alexdima alexdima added the editor-contrib Editor collection of extras label Feb 6, 2017
@alexdima alexdima removed their assignment Feb 6, 2017
@misantronic
Copy link
Author

Works quite well, thank you!

Its not that the hover-informations are bad, they just pop up everywhere :)
I would suggest to add a delay-option to keep the popup-rate low.

@alexdima
Copy link
Member

alexdima commented Feb 6, 2017

It isn't user configurable, the delays is hard-coded to 300ms.

https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/hover/browser/hoverOperation.ts#L51

@WoodyWoodsta
Copy link

Incredible. I was just looking for this. The HTML and CSS hovers are way too verbose. I've been working with CSS for a while, I know what background does 😄

What would be better is if the popups could be triggered by some other, more intentional means, such as a keyboard shortcut. I'd hazard a guess that 95% of the time, the user wants information provided by the popup after actively deciding to find it. The hover action does not convey this degree of intention.

@alexdima
Copy link
Member

alexdima commented Feb 6, 2017

At least on linux it is ctrl+k ctrl+i. Look for F1 > Show Hover

@WoodyWoodsta
Copy link

Brilliant 👍 Thank you.

@misantronic
Copy link
Author

I get an error-message when doing so:
Cannot read property 'startShowingAt' of undefined

@WoodyWoodsta
Copy link

@misantronic Confirmed. Reloading the window does not resolve the issue.

@alexdima
Copy link
Member

alexdima commented Feb 6, 2017

@misantronic @WoodyWoodsta ctrl+k ctrl+i works for me:

I position the cursor at the position I'm interested in and press ctrl+k crtl+i on windows:

hover-kb

Perhaps there's something more to it? (to get Cannot read property 'startShowingAt' of undefined ?

@WoodyWoodsta
Copy link

After looking around, it appears that the keybind works after setting editor.hover to false but only up until you reload the window. After reloading the window, the error shows. Setting editor.hover back to true only reflects when reloading the window again.

@WoodyWoodsta
Copy link

In my opinion, editor hovers could benefit from having more configuration. For example, hovers on linter errors are incredibly helpful (required, in fact, unless you want to keep opening the errors pane), but html tag info: not so much. Typescript-like info in a normal Javascript file is also a question mark in my mind. It is unfortunate that it is an all-or-nothing choice (and an unofficial one too). I am unsure of the mechanism behind hovers, but if this is something worth discussing further, then should a new issue be opened?

@misantronic
Copy link
Author

@alexandrudima I am on mac and supossed to press ctrl + J. Whenever I do set the error-message pops up. Might be a mac issue?

@WoodyWoodsta I totally agree on that.
I use flow a lot and hovering is really helpful in those cases. but most of the time - I dont need the popups.

@DarrylD
Copy link

DarrylD commented Jun 21, 2017

I use flow a lot and hovering is really helpful in those cases. but most of the time - I dont need the popups.

I'm in the same boat, any solution to this? I also get Cannot read property 'startShowingAt' of undefined

@romines
Copy link

romines commented Sep 27, 2017

See #32786

@amackintosh
Copy link

amackintosh commented Oct 26, 2017

This is super annoying. "editor.hover": false, does work and requires a restart of VS Code, but it also disables ES Lint tooltips. I can't stand it and I can't live without it :(

@alexdima
Copy link
Member

@amackintosh Problems can also be viewed in the problems panel (View > Problems) or in the editor via F8/Shift-F8

@amackintosh
Copy link

amackintosh commented Oct 26, 2017

Thanks, but that is not efficient. I want every tool tip except this one:

editor

The fastest possible solution would be to increase the hover time to like 500-1000ms, because it comes up pretty much instantly and prevents selecting text above the hover-triggering-text the mouse passes through.

I would like to see either of the following:

  1. "editor-typescript-tooltips": false (only affects those tooltips of the type shown in the above screenshot)
  2. user-definable "editor-hover-wait-time": "1000ms"

The best solution would be to make user-definable hover settings available and for each tooltip type.

Here is another screenshot to illustrate:

sampler3

@alexdima
Copy link
Member

@amackintosh The last screenshot is of parameter hints. editor.parameterHints: false. As for the type information hover, perhaps @mjbvz can transmit or capture the feedback to the TS team that the type information becomes useless in JavaScript when the type requires more than 100 chars to convey (i.e. is very complex or "not-nameable").

@mjbvz
Copy link
Collaborator

mjbvz commented Oct 27, 2017

Yes we have a few issues tracking improving display of complex types:

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-contrib Editor collection of extras feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

8 participants