diff --git a/src/vs/workbench/parts/codeEditor/browser/media/suggestEnabledInput.css b/src/vs/workbench/parts/codeEditor/browser/media/suggestEnabledInput.css index 65fd4a3c8ba41..5f9aa74a0b477 100644 --- a/src/vs/workbench/parts/codeEditor/browser/media/suggestEnabledInput.css +++ b/src/vs/workbench/parts/codeEditor/browser/media/suggestEnabledInput.css @@ -24,4 +24,8 @@ pointer-events: none; margin-top: 2px; margin-left: 1px; -} \ No newline at end of file +} + +.suggest-input-container .monaco-editor .suggest-widget.no-icons .monaco-list .icon { + display: none; +} diff --git a/src/vs/workbench/parts/codeEditor/browser/suggestEnabledInput.ts b/src/vs/workbench/parts/codeEditor/browser/suggestEnabledInput.ts index 62d86f7f95568..4c98cac27b2f1 100644 --- a/src/vs/workbench/parts/codeEditor/browser/suggestEnabledInput.ts +++ b/src/vs/workbench/parts/codeEditor/browser/suggestEnabledInput.ts @@ -124,8 +124,16 @@ export class SuggestEnabledInput extends Widget implements IThemable { this.stylingContainer = append(parent, $('.suggest-input-container')); this.placeholderText = append(this.stylingContainer, $('.suggest-input-placeholder', null, options.placeholderText || '')); + const editorOptions: IEditorOptions = { + ...getSimpleEditorOptions(), + ...getHTMLInputStyleOptions(ariaLabel), + ...{ + iconsInSuggestions: false + } + }; + this.inputWidget = instantiationService.createInstance(CodeEditorWidget, this.stylingContainer, - mixinHTMLInputStyleOptions(getSimpleEditorOptions(), ariaLabel), + editorOptions, { contributions: [SuggestController, SnippetController2, ContextMenuController, MenuPreventer], isSimpleWidget: true, @@ -244,17 +252,20 @@ export class SuggestEnabledInput extends Widget implements IThemable { } -function mixinHTMLInputStyleOptions(config: IEditorOptions, ariaLabel?: string): IEditorOptions { - config.fontSize = 13; - config.lineHeight = 22; - config.wordWrap = 'off'; - config.scrollbar.vertical = 'hidden'; - config.roundedSelection = false; - config.ariaLabel = ariaLabel || ''; - config.renderIndentGuides = false; - config.cursorWidth = 1; - config.snippetSuggestions = 'none'; - config.suggest = { filterGraceful: false }; - config.fontFamily = ' -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif'; - return config; +function getHTMLInputStyleOptions(ariaLabel?: string): IEditorOptions { + return { + fontSize: 13, + lineHeight: 22, + wordWrap: 'off', + scrollbar: { + vertical: 'hidden', + }, + roundedSelection: false, + ariaLabel: ariaLabel || '', + renderIndentGuides: false, + cursorWidth: 1, + snippetSuggestions: 'none', + suggest: { filterGraceful: false }, + fontFamily: ' -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif', + }; }