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
I'm trying to build an extension that presents a list of npm-packages in the command palette. As the user scrolls down the list, I would like to show a preview-html of the package's README in a virtual document (see screenshot). The existing InputOptions do not help me in accomplishing this. For now, I'm using showQuickPick but I don't think it exposes a callback for the event of user moving down the list.
This experience would be similar to how vscode accomplishes previewing a color theme when the user is browsing through the different available themes from the command palette. This code is what I think I need, but it is not part of the public api.
// Thanks to @hoovercj for helping me navigate through the source.
screenshot:
The text was updated successfully, but these errors were encountered:
I have an extension for a language called octo and I bundle documentation and sample code with it. As the OP does, I use quick picks to expose those and it would be hugely beneficial if I could simultaneously show the content of docs or sample code in an editor as the user cycles through the options.
@balajikris you and I both missed something obvious. oops!
QuickPickOptions takes an onDidSelectItem callback that does what we both need.
I connected it with a TextDocumentContentProvider in a sample extension here which I'll be folding into my real extensions after this fix comes out with the next release.
@hoovercj ah! I see. I noticed that event but got confused as to what selection meant - cycling through with arrow keys or commiting one by hitting Enter. Thanks for looking into this -- your api-playground idea is awesome, I'll take a peek. Thanks much!
Steps to Reproduce:
I'm trying to build an extension that presents a list of npm-packages in the command palette. As the user scrolls down the list, I would like to show a preview-html of the package's README in a virtual document (see screenshot). The existing
InputOptions
do not help me in accomplishing this. For now, I'm usingshowQuickPick
but I don't think it exposes a callback for the event of user moving down the list.This experience would be similar to how vscode accomplishes previewing a color theme when the user is browsing through the different available themes from the command palette. This code is what I think I need, but it is not part of the public api.
// Thanks to @hoovercj for helping me navigate through the source.
screenshot:

The text was updated successfully, but these errors were encountered: