File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -263,24 +263,32 @@ export class RubyLsp {
263
263
}
264
264
265
265
const options : vscode . QuickPickItem [ ] = client . addons
266
- . sort ( ( addon ) => {
267
- // Display errored addons last
268
- if ( addon . errored ) {
269
- return 1 ;
270
- }
271
-
272
- return - 1 ;
273
- } )
266
+ . sort ( ( addon ) => ( addon . errored ? 1 : - 1 ) )
274
267
. map ( ( addon ) => {
275
268
const icon = addon . errored ? "$(error)" : "$(pass)" ;
276
269
return {
277
270
label : `${ icon } ${ addon . name } ${ addon . version ? `v${ addon . version } ` : "" } ` ,
278
271
} ;
279
272
} ) ;
280
273
281
- await vscode . window . showQuickPick ( options , {
282
- placeHolder : "Addons (readonly)" ,
274
+ const quickPick = vscode . window . createQuickPick ( ) ;
275
+ quickPick . items = options ;
276
+ quickPick . placeholder = "Addons (click to view output)" ;
277
+
278
+ quickPick . onDidAccept ( ( ) => {
279
+ const selected = quickPick . selectedItems [ 0 ] ;
280
+ // Ideally, we should display information that's specific to the selected addon
281
+ if ( selected ) {
282
+ this . currentActiveWorkspace ( ) ?. outputChannel . show ( ) ;
283
+ }
284
+ quickPick . hide ( ) ;
283
285
} ) ;
286
+
287
+ quickPick . onDidHide ( ( ) => {
288
+ quickPick . dispose ( ) ;
289
+ } ) ;
290
+
291
+ quickPick . show ( ) ;
284
292
} ) ,
285
293
vscode . commands . registerCommand ( Command . ToggleFeatures , async ( ) => {
286
294
// Extract feature descriptions from our package.json
You can’t perform that action at this time.
0 commit comments