package_control icon indicating copy to clipboard operation
package_control copied to clipboard

feature request: show more than 3 autocomplete entries for 'install packages'

Open dreamcat4 opened this issue 6 years ago • 2 comments

It would be nice to configure this as a user setting. So that we can see more autocomplete results at any given time.

Not entirely sure where in the code this box is being opened... perhaps it might be from here?

https://github.com/wbond/package_control/blob/db53090bd0920ca2c58ef27f0361a4d7b096df0e/package_control/commands/install_package_command.py#L60

Well if that is the case then I am not sure how to achieve this. Because the API documentation for show_quick_panel() method does not take any parameter to specify the number of autocomplete entries to display.

Yet I assume the effect may be somehow otherwise possible? Does the number of autocomplete entries increase for 2-line and 1-line arrays of strings? Perhaps it's based on the total number of lines to display (perhaps '10') since we can also see the 1st line of the 4th entry.

Many thanks to anybody who can help with this.

dreamcat4 avatar Jul 15 '19 20:07 dreamcat4

I see 5 items when I run the install package command. This is probably related to the theme and further determined by the height of your window. Either way, not something that PC can control via ST's API.

2019-07-16_02-45-54

FichteFoll avatar Jul 16 '19 00:07 FichteFoll

hey there. I was previously using the Monokai Dark theme. Then switched to Material theme. It was 3 entries for me both cases. My vertical resolution was 1440p both times.

Indeed it sounds like perhaps a change might be needed in the core sublime text 3 in order to accommodate passing an extra option through the API. For setting this autocomplete characteristic of the popup.

However what is not so clear to me is if there is some alternative (more advanced) API call, already exposed that can handle this. Or alternatively if there is some per-theme setting for my Material theme that I can more easily tweak to adjust the behaviour of this existing popup... without requiring / incurring the extra burden on others for reviewing this feature, how it works, changing the source code, changing the sublime text API, and then the call in this package control source code, etc.

Perhaps a peek in the core sublime text 3 source code would be able to tell us more. Not sure if i have access to that on github here. But perhaps you guys who do the package control thing have better understanding / access to the inner workings of all that.

dreamcat4 avatar Jul 16 '19 08:07 dreamcat4

There's nothing Package Control can do against themes adding insane large paddings to any kind of UI element.

Size of Quick Panels is predefined by ST based on Window size. Some infos need to be displayed, so line 2 and 3 can't just be removed.

A possible solution could be using ListInputHandlers, but

  1. they are not supported by ST3143
  2. they have several usability issues in ST3 in general
  3. they don't work well with the async nature of how available packages are fetched

So they are more or less ruled out.

deathaxe avatar Sep 24 '22 19:09 deathaxe