Update: Fixed in core!
VS Code has fixed this problem in VS Code Update October 2020 with Resizeable Suggestions ! You can now use a resizing tool at the bottom right corner of the "details" window to resize the box, and that size should be saved across sessions:
So this question now relates to fixed behavior, and all the complexity is no longer needed! I'm keeping the text below for the sake of history, but if you just want to control the size of the popup intellisense box, do what the gif above shows!
Original Question
VS Code supports code completion/suggestion with the Intellisense system, which gets implemented by various extensions for various languages. It works well for offering you choices as a plain list (called .tree
in the HTML), but the system to show you more details about each choice suffers from some very bad design/usability in many cases.
These "Suggestion Details" can be made visible by clicking the "read more" button on the right side of a suggestion in the "tree" list, or by invoking the keyboard shortcut for completion (CMD+space on macOS) again while viewing the list. The contents will depend on your extension, but tend to be summaries of the documentation and arguments for the suggested object, method, etc.
The key problems, as I see them (and as others have complained about on the VS Code Github for years) are that the box is always very small, and doesn't even attempt to fill the available horizontal or vertical space, resulting in cut off information that wraps to many lines and needs to be scrolled through which is very distracting and unhelpful.
Additionally, there's no way to configure the font-size of this box, it always uses the default editor font size, meaning the small box is even more overloaded by the information inside.
Note: In my case I'm using PHP via the Intelephense extension, but I think the font and box size issue is much more general and applies to any language/extension that implements this "read more"/description box.
VS Code "Suggestion Details" example
Notice how the details box is totally cut off. This happens regardless of the size of the editor, it never gets bigger than this!
Netbeans code-completion at the same window size
For comparison, here is a similar panel from Netbeans. Now Netbeans is very, very ugly, but in terms of conveying information, it gets a LOT more done both by taking up more space, and by wisely using the space it has.
How can I make the details box bigger?
Even if all else was the same, making this box larger would make it much easier to use. Are there configuration parameters or extensions that could make it larger?
How can I control the font size of the details box?
I would be happy to have smaller text in this box if it meant it held more information without scrolling. Are there configuration variables or ways of unlinking this font size from that of the editor?
Can I change the contents of the details or its order?
If I'm stuck with this tiny box with large text, maybe altering the contents would improve the situation somewhat. Are there configuration variables to change these contents?
UPDATE: The contents of the Suggestion Details box are controlled by the extension that controls the suggestions, in my case, the PHP extension Elephesense. The extension creator can't change the size of the text or box, but they do have some control over the contents and their order.
Related question already answered: Changing the left-hand list of method names (tree).
Note: This question is similar to How to make VS Code Intellisense Window Wider, but different. In that question, the OP is specifically asking about the list of names that Intellisense pops up first (the part on the left, referred to as .tree
in the HTML) whereas I am asking about the "details" view that pops up to its right when you click "read more".
By default this list, like the "details" box, uses the default editor font setting configured with editor.fontSize
.
If what you want is to control the list on the left (e.g. if your method names are very long and don't fit) there are two built in settings you can use to change the font size and line height:
// Set an override font size for the list of suggestions
"editor.suggestFontSize": 12,
// Set an override font size for the list of suggestions
"editor.suggestLineHeight": 12,
What I want is a setting like that but for the righthand box that shows the details! As far as I can tell there's no setting for that anywhere.