zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
34.47k stars 1.71k forks source link

Key binding to show informational tooltip #11395

Closed narqo closed 2 weeks ago

narqo commented 2 weeks ago

Check for existing issues

Describe the feature

Zed's hover_popover_enabled setting controls if editor shows a tooltip with an information about a symbol under the mouse cursor. When this setting is disabled, I don't think there is currently a way to look up such information.

I propose adding a new key binding to Zed, that opens an information tooltip for the symbol, which is currently under the editor's cursor.

If applicable, add mockups / screenshots to help present your vision of the feature

I don't have a mockup for the feature, but what I have in mind (and what I got used to from using other code editors), is Parameter info ⌘+P in JetBrains IDEs:

Parameter info: Cmd+P on macOS, Ctrl+P on Windows/Linux — Shows the method call’s arguments with types.

Moshyfawn commented 2 weeks ago

There is an editor::Hover keybind to trigger the hover action, which is set to cmd-k cmd-i by default. You can use it to toggle the symbol tooltip. See #6489 for more information. Let me know if this solves your use-case.

narqo commented 2 weeks ago

There is an editor::Hover keybind to trigger the hover action

Oh, right. I was looking for a command that has "popover" or "hint" part in it, and didn't even think of "hover". Thank you for pointing it out.