microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.31k stars 28.9k forks source link

Configure tooltip max width #14165

Closed OliverJAsh closed 1 year ago

OliverJAsh commented 7 years ago

When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.

MarvellousLunatic commented 1 year ago

Will this feature also allow us to define the window size of a hover provider in a extension above the current limitations?

aiday-mar commented 1 year ago

Hi @svipas, if is is decided that the hover widget size should be configurable, there will be a command to clear the persisted sizes. This feature is still under discussion.

Hi @ShalokShalom, depending on the implementation, it is possible that the persisted sizes are persisted or not across different sessions. This is still under discussion. Currently the implementation is such that the maximum natural width is the same as before.

Hi @MarvellousLunatic, the current implementation does not provide this functionality. This could be addressed in a separate issue as it is related to the usage of the hover widget by extensions.

The current PR that is worked on is the following: https://github.com/microsoft/vscode/pull/178811

ShalokShalom commented 1 year ago

Thanks a lot. And do you consider increasing the default size, that is unfitting to most real world scenarios?

The windows is so small, that I feel the need to increase it even on my WXGA Laptop.

aiday-mar commented 1 year ago

Hey all, thank you for the patience. A PR has been merged in order to make the content hover resizable. The change should be visible in tomorrow's VS Code insiders version and in the next stable release which will happen in the coming two weeks. There currently is no mechanism to save the content hover - we are discussing how best to approach it. You may track the issue on persisting the hover content here: https://github.com/microsoft/vscode/issues/185743

@ShalokShalom we are currently not thinking about increasing the default maximum size. However it is possible that we implement the persisting mechanism as follows: when you increase the content hover size to a specific size, this size is persisted, and it is applied as maximum default size on the next hover appearances. This potential implementation is still under discussion by our team.

macintacos commented 1 year ago

Just want to say thank you @aiday-mar, you seem to have been tackling a lot of these high-level nitpicks that have been in the VSCode backlog for years, and for that I am very appreciative.

svipas commented 1 year ago

@aiday-mar I can't find a command to clear/reset hover widget size, is this has been added?

aiday-mar commented 1 year ago

Hi @svipas, currently the command does not exist because a persisting mechanism has not been put into place as of yet. It will appear when the latter is added.

svipas commented 1 year ago

@aiday-mar Oh okay, thanks a lot 👍