You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatically expand full docstring when autocompleting #18582
Tried my hand at this and below are a few options.
Docs shown below the suggestion list
Docs shown below the suggestion list + reduced suggestion count so that the item in focus is nearer to the docs. Less jumping of user's focus between item in focus and the docs?
Docs shown side to side
In all cases the height of the docs section is fixed and the docs is scrollable.
Some smart logic can be added to make the height of the docs dynamic.
But different font-sizes and fonts would render text with different width. So that can get tricky.
I propose to add a setting editor.suggestAutoExpand with true/false: false by default
Or with off, below, side. off by default
Get user feedback and then take it from there.
Thoughts anyone?
cc @Microsoft/vscode
Reacted by Дмитрий, Mikhail Ivchenko, Nobody Nobodyan, ekudryashov, Oleg, Gregory Bass, Andrew Kazakov, Denis Malinochkin, Avin Lambrero, Maksim Nazarjev and 13 more
I'm not sure making this configurable and supporting multiple configs would be worth it. I certainly wouldn't assume that it would be configurable and seek out a setting to change it.
VS has been finely tuned for a number of years and pops a window to the right, so #3 is consistent with this behavior. VS pops the flyout after a slight delay it appears, presumably to let you quickly scroll through the IntelliSense list and not be distracted by the flyouts. The flyout window is sized for the content, it does not take up the full height of the IntelliSense list. This is goodness because it obscures less of the screen/underlying code, so I'm in favor of dynamically sizing the doc area.
What happens when the editor is too narrow or if the completion is near the end of a long line?
Chris Dias (@chrisdias)
When completion is near the end of a long line, the suggestion list as well as the docs show up on the left side of the cursor just like it does today.
With narrower editors, the whole section resizes to fit itself.
I would stay away from any configuration and just provide a single good solution.
Overall I really like option 2, if we further decrease the number of options (3-5) and make the height of the documentation variable, taking up as much space as it needs up to a certain point, when it becomes scrollable.
I also wish to somehow make it expanded by default. A setting in settings.json is fine with me.
I personally prefer the settings appearing on the side. ❤️
I like the docs on the side as then this section won't jump around and will always start just under the line where I'm typing.
Reacted by Benas Svipas, Mick Dekkers and Oleg Lustenko
Can you elaborate on which section jumps around and when in the latest insiders?
Perhaps "jumping around" was not the best way to describe what I meant. :)
What I meant was that when you hit ctrl + space, the list of available objects varies and so does the height of this list. If you opt to have the docs at the bottom, your eyes won't immediately know exactly where the docs will show up; thus the docs text "jumps around"...
Instead, if the docs appear on the side, your eyes will know exactly where to look for it, as it always appears just below the line where you are typing.
I merely wanted to point out why I preferred the docs text on the side, and this was why.
Does this make sense to you and does this answer your question?
Right now when expanding docs for local variables with no documentation, the widget window shrinks when it previously did nothing. Is this supposed to happen?
I much preferred how it was a couple updates ago with the expanded docs to the side. Will there be an option for the placement or is it now set to be below?
Ramya Rao (@ramya-rao-a) I currently use "window.zoomLevel": -1 which seems to force placement below. If I change the setting to 0 I get correct placement to the right side.
I currently work on a laptop with low resolution so I need to zoom out a bit.
-- Sorry for the English, I used Google Translator -- Ramya Rao (@ramya-rao-a) Is there an issue with this request to be on the bottom? That is, make it configurable?
Activity
ramya-rao-a commentedon Apr 23, 2017
Tried my hand at this and below are a few options.
Docs shown below the suggestion list
Docs shown below the suggestion list + reduced suggestion count so that the item in focus is nearer to the docs. Less jumping of user's focus between item in focus and the docs?
Docs shown side to side
In all cases the height of the docs section is fixed and the docs is scrollable.
Some smart logic can be added to make the height of the docs dynamic.
But different font-sizes and fonts would render text with different width. So that can get tricky.
I propose to add a setting
editor.suggestAutoExpandwithtrue/false:falseby defaultOr with
off,below,side.offby defaultGet user feedback and then take it from there.
Thoughts anyone?
cc @Microsoft/vscode
mrmlnc commentedon Apr 23, 2017
Ramya Rao (@ramya-rao-a), I'm outside Victor Salazar (@VScode) scope, but I'm in. I think this is a very useful feature.
Tyriar commentedon Apr 23, 2017
Ramya Rao (@ramya-rao-a) the ones on the bottom need either a top border or a different background color imo.
ramya-rao-a commentedon Apr 23, 2017
Denis Malinochkin (@mrmlnc) So sorry, didn't mean to exclude anybody, updated my text :)
roblourens commentedon Apr 23, 2017
I really like the last option, showing them to the right (but I agree that it should be configurable)
Tyriar commentedon Apr 23, 2017
I'm not sure making this configurable and supporting multiple configs would be worth it. I certainly wouldn't assume that it would be configurable and seek out a setting to change it.
chrisdias commentedon Apr 24, 2017
VS has been finely tuned for a number of years and pops a window to the right, so #3 is consistent with this behavior. VS pops the flyout after a slight delay it appears, presumably to let you quickly scroll through the IntelliSense list and not be distracted by the flyouts. The flyout window is sized for the content, it does not take up the full height of the IntelliSense list. This is goodness because it obscures less of the screen/underlying code, so I'm in favor of dynamically sizing the doc area.
What happens when the editor is too narrow or if the completion is near the end of a long line?
ramya-rao-a commentedon Apr 24, 2017
Chris Dias (@chrisdias)
When completion is near the end of a long line, the suggestion list as well as the docs show up on the left side of the cursor just like it does today.
With narrower editors, the whole section resizes to fit itself.
joaomoreno commentedon Apr 24, 2017
I would stay away from any configuration and just provide a single good solution.
Overall I really like option 2, if we further decrease the number of options (3-5) and make the height of the documentation variable, taking up as much space as it needs up to a certain point, when it becomes scrollable.
ramya-rao-a commentedon Apr 24, 2017
Here are some updates:
The side by side option with the docs now having dynamic height instead of fixed height
The below option with lesser items, border between items and docs and dynamic height instead of fixed height

17 remaining items
fredrikaverpil commentedon May 19, 2017
I also wish to somehow make it expanded by default. A setting in settings.json is fine with me.
I personally prefer the settings appearing on the side. ❤️
I like the docs on the side as then this section won't jump around and will always start just under the line where I'm typing.
svipas commentedon May 19, 2017
Christof Marti (@chrmarti) Fredrik Averpil (@fredrikaverpil) I love you guys! 😄
ramya-rao-a commentedon May 19, 2017
Fredrik Averpil (@fredrikaverpil)
Can you elaborate on which section jumps around and when in the latest insiders?
fredrikaverpil commentedon May 20, 2017
Perhaps "jumping around" was not the best way to describe what I meant. :)
What I meant was that when you hit ctrl + space, the list of available objects varies and so does the height of this list. If you opt to have the docs at the bottom, your eyes won't immediately know exactly where the docs will show up; thus the docs text "jumps around"...
Instead, if the docs appear on the side, your eyes will know exactly where to look for it, as it always appears just below the line where you are typing.
I merely wanted to point out why I preferred the docs text on the side, and this was why.
Does this make sense to you and does this answer your question?
fredrikaverpil commentedon May 20, 2017
Ramya Rao (@ramya-rao-a) perhaps I found a bug...
Please see here (Quicktime): https://drive.google.com/open?id=0B0b1IUnYqENgdk9nU0R1UjlmZ0U
I first hit ctrl + space to bring up the list of objects. Then I hit ctrl + alt + space to show the docs at the bottom. See how the docs text doesn't update while I move up and down the list of objects?
I noticed this when I was going to answer your previous question. This is on macOS.
EDIT: Added a Quicktime showing it works great with the docs expanding to the side: https://drive.google.com/open?id=0B0b1IUnYqENgbW1tVy1PRV8zeFk ❤️
ramya-rao-a commentedon May 20, 2017
Good catch Fredrik Averpil (@fredrikaverpil)
Ctrl+Alt+Space was meant to move focus between list and docs but only if the docs was already expanded.
Fixed with c671df0
The fix will be out in Monday's insiders
AndyBay commentedon May 22, 2017
Right now when expanding docs for local variables with no documentation, the widget window shrinks when it previously did nothing. Is this supposed to happen?

I much preferred how it was a couple updates ago with the expanded docs to the side. Will there be an option for the placement or is it now set to be below?
ramya-rao-a commentedon May 22, 2017
AndyBay No thats not suppose to happen.
The docs are suppose to expand below only if VS Code window is too small to accommodate the side by side view.
The list section shrinks only when docs are to expand on the side. When docs end up below, they shouldn't shrink.
Are you on the latest insiders?
AndyBay commentedon May 22, 2017
Ramya Rao (@ramya-rao-a) I currently use
"window.zoomLevel": -1which seems to force placement below. If I change the setting to0I get correct placement to the right side.I currently work on a laptop with low resolution so I need to zoom out a bit.
I am on the latest insiders yes.
Tyriar commentedon May 22, 2017
AndyBay that's captured in #26886
Tekbr commentedon May 26, 2017
-- Sorry for the English, I used Google Translator --
Ramya Rao (@ramya-rao-a) Some things I do not understand. So sorry for my silly question, but how do you make the suggestions look like this?
or
ramya-rao-a commentedon May 27, 2017
Tekbr that happens only when the VS Code window is too small to hold the docs on the side of the list.
Tekbr commentedon May 29, 2017
-- Sorry for the English, I used Google Translator --
Ramya Rao (@ramya-rao-a) Is there an issue with this request to be on the bottom? That is, make it configurable?
ramya-rao-a commentedon May 30, 2017
Tekbr no, but you can open a new issue for that. If it gets considerable up votes, we will consider adding a setting