@@ -19,6 +19,7 @@ import { localize } from '../../../../nls.js';
19
19
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js' ;
20
20
import { SuggestWidgetStatus } from '../../../../editor/contrib/suggest/browser/suggestWidgetStatus.js' ;
21
21
import { MenuId } from '../../../../platform/actions/common/actions.js' ;
22
+ import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js' ;
22
23
23
24
const $ = dom . $ ;
24
25
@@ -86,7 +87,8 @@ export class SimpleSuggestWidget extends Disposable {
86
87
private readonly _persistedSize : IPersistedWidgetSizeDelegate ,
87
88
private readonly _getFontInfo : ( ) => ISimpleSuggestWidgetFontInfo ,
88
89
options : IWorkbenchSuggestWidgetOptions ,
89
- @IInstantiationService instantiationService : IInstantiationService
90
+ @IInstantiationService instantiationService : IInstantiationService ,
91
+ @IConfigurationService configurationService : IConfigurationService ,
90
92
) {
91
93
super ( ) ;
92
94
@@ -141,6 +143,9 @@ export class SimpleSuggestWidget extends Disposable {
141
143
state = undefined ;
142
144
} ) ) ;
143
145
146
+ const applyIconStyle = ( ) => this . element . domNode . classList . toggle ( 'no-icons' , ! configurationService . getValue ( 'editor.suggest.showIcons' ) ) ;
147
+ applyIconStyle ( ) ;
148
+
144
149
const renderer = new SimpleSuggestWidgetItemRenderer ( _getFontInfo ) ;
145
150
this . _register ( renderer ) ;
146
151
this . _listElement = dom . append ( this . element . domNode , $ ( '.tree' ) ) ;
@@ -196,6 +201,11 @@ export class SimpleSuggestWidget extends Disposable {
196
201
this . _register ( this . _list . onMouseDown ( e => this . _onListMouseDownOrTap ( e ) ) ) ;
197
202
this . _register ( this . _list . onTap ( e => this . _onListMouseDownOrTap ( e ) ) ) ;
198
203
this . _register ( this . _list . onDidChangeSelection ( e => this . _onListSelection ( e ) ) ) ;
204
+ this . _register ( configurationService . onDidChangeConfiguration ( e => {
205
+ if ( e . affectsConfiguration ( 'editor.suggest.showIcons' ) ) {
206
+ applyIconStyle ( ) ;
207
+ }
208
+ } ) ) ;
199
209
}
200
210
201
211
private _cursorPosition ?: { top : number ; left : number ; height : number } ;
0 commit comments