-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path Completion: Use File Icon for suggestions #44860
Comments
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 ( |
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 If other LSP clients don't have the file icon notion they can always provide one file icon. |
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... |
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... |
@jrieken Looks very nice, amazing work!!! 🔥 I have several questions:
My main concern is performance and the ability to use the same icons as selected in the icon theme. |
Thanks, @jrieken, I really appreciate your work and all the information. 👍 |
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 799bc78 |
I think for TS, they return import path without suffix and there is no way to guess the file icon from it. |
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 |
@octref please read #44860 (comment) |
@jrieken I see, I'll try to send a PR for TypeScript, so the |
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.
The text was updated successfully, but these errors were encountered: