Whether it comes from internal or external icon theme.
For example, this isn't really nice

Would be great to show js/ts icons there.
For html path completion it would be much nicer too.
This would probably require changes in CompletionItemKind in LSP.
@mjbvz think you might be interested too.
Duplicate of #43204 which I closed as not worth the effort for js/ts. Html paths could be more interesting
With modern module bundlers (like webpack) it's possible to import other files (.css, .png,...) from js. Icons would be helpful in that case too.
I am not sure what I should do with this. The CompletionItemKind has values for file and folder. There are no plans in the LSP to have CompletionItemKinds for different file types.
As @mjbvz pointed out he closed this request against TS.
@octref any objection to close this issue?
@dbaeumer I do realize LSP isn't the right place to add support for this feature.
@jrieken I see #22206 and am wondering if you can provide any input. We have the dynamically generated icon for type color -- wondering if the same can be done for type file.
The reason for keeping the number of completion item kinds is low is to lower the burden of implementing the LSP. It's not nice to require an implementor to bring along 50+ icons. Custom, extension defined, icons isn't the answer neither because then e.g. Eclipse-icons will be used inside VS Code leading to an alien-look.
It's a fine line of finding an expressive set of common icons and we will never meet all demands but that's also the idea of it.
@jrieken Can we possibly make this a client-specific behavior. For example, when CompletionItemKind is file, read the filename in either label or textedit, match it against VS Code's matching rule for file icons, and use that icon for completion.
If other LSP clients don't have the file icon notion they can always provide one file icon.
It really helps to differentiate between the suggestion items. As @usernamehw said, Webpack allows you to import css/jpg/png/svg and whatever file Webpack's loader could resolve.
For example, when CompletionItemKind is file, read the filename in either label or textedit, match it against VS Code's matching rule for file icons, and use that icon for completion.
Hm, interesting idea I like. Maybe a little harder to magic-match than colors but we should give it a try
@mjbvz For this to work, we would need to get the full path (or at least the name with its extension), e.g. as documentation label...
I don't even know how to express myself, @jrieken created tabCompletion -> 'on' and localityBonus. @octref is working on path completion icons. Guys, it's not even Christmas and I'm getting all my gifts. I'm sooo happy 馃槃
Sorry for offtopic 馃槃
The one challenge here is how file icons look together with symbols icon. The former can be themed the latter not so this has potential for ugliness...
We have a first version for this

@jrieken Looks very nice, amazing work!!! 馃敟
I have several questions:
Loading...in suggestion widget.My main concern is performance and the ability to use the same icons as selected in the icon theme.
Yeah, it will take the icons from the icon theme. When no icon theme is in use you get what you have today. Performance impact shouldn't be noticeable, we only render different icons. The Loading... comes from the language brain, computing suggestions.

Thanks, @jrieken, I really appreciate your work and all the information. 馃憤
Looks great! One small problem, the folder icon feels not right 馃槄

Yeah, it still needs some tweaks with alignment and it doesn't respect folder icons yet. The challenge is that some themes don't have an icon for folders...
It seems to be aligned to top...

And it's not working inside typescript import path completion... Is it intentional?
OS: Win10 x64 799bc78af597769a5dd5a6b002359ddae412b1be
I think for TS, they return import path without suffix and there is no way to guess the file icon from it.
And it's not working inside typescript import path completion
@usernamehw https://github.com/Microsoft/vscode/issues/44860#issuecomment-427820307
It seems to be aligned to top...
Do you have a special config for the suggest font size?
"editor.suggestLineHeight": 40,
"editor.suggestFontSize": 20,
@jrieken Can we add a configuration for this to enable/disable? Personally, I like this, but if someone dislikes it they will always be able to disable it from settings.
@jrieken This is broken in the latest insiders. I only get icons for folders, but file icons don't work anymore.
@jrieken I'm in a TS file and trying to do require, but TS LS returns all filenames without the suffix. Is there any way TS could update their CompletionItem so it displays the nice icons?

@octref please read https://github.com/Microsoft/vscode/issues/44860#issuecomment-427820307
@jrieken I see, I'll try to send a PR for TypeScript, so the CompletionItems have label with suffixes like main.ts, router.js but the textedit doesn't contain the labels.
Icons are way too small now. Is it possible to have them the same size as before?:
| Stable | Insiders |
| ------------- | ------------- |
|
|
|
Most helpful comment
We have a first version for this