export type CompletionItemIcons = | 'Text' | 'Method' | 'Function' | 'Constructor' | 'Field' | 'Variable' | 'Class' | 'Interface' | 'Module' | 'Property' | 'Unit' | 'Value' | 'Enum' | 'Keyword' | 'Snippet' | 'Color' | 'File' | 'Reference' | 'Folder' | 'EnumMember' | 'Constant' | 'Struct' | 'Event' | 'Operator' | 'Console' | 'TypeParameter'; export function getIconForType(iconTypeString = 'Text', isDarkTheme = false) { const lightThemeIcons: Record = { Keyword: ` `, Text: ` `, Method: ` `, Function: ` `, Constructor: ` `, Field: ` `, Variable: ` `, Class: ` `, Interface: ` `, Module: ` `, Property: ` `, Unit: ` `, Value: ` `, Enum: ` `, Snippet: ` `, Color: ` `, File: ` `, Reference: ` `, Folder: ` `, EnumMember: ` `, Constant: ` `, Struct: ` `, Event: ` `, Operator: ` `, Console: ` `, TypeParameter: ` `, }; const darkThemeIcons: Record = { Keyword: ` `, Text: ` `, Method: ` `, Function: ` `, Constructor: ` `, Field: ` `, Variable: ` `, Class: ` `, Interface: ` `, Module: ` `, Property: ` `, Unit: ` `, Value: ` `, Enum: ` `, Snippet: ` `, Color: ` `, File: ` `, Reference: ` `, Folder: ` `, EnumMember: ` `, Constant: ` `, Struct: ` `, Event: ` `, Operator: ` `, Console: ` `, TypeParameter: ` `, }; const iconType = iconTypeString as CompletionItemIcons; const icons = isDarkTheme ? darkThemeIcons : lightThemeIcons; return icons[iconType] ?? icons.Keyword; }