Open Khaos66 opened 3 years ago
I am not sure I understand you request. Where should these icons show up?
Well, of course there needs to be editor support added for this as well to actualy show up. But I was asuming that there needs to be LSP support for that feature first.
Anyway, here is how this could show up. Have you ever used Android Studio? There icons referenced in code are displayed on the left side of the line. This picture taken from A StackOverflow question should help you understand
I'm not saying, that this is how editors should display the icons. It's just one way. I like how VSCode displays colors right next to the color code. Maybe this could be a valid way to display icons in code as well
I think @Khaos66 would like to have a LSP request IconInformation
that it could be consumed in CSS language server for instance to display the icon on the left of background-image
(like for ColorInformation for CSS color)
[LIZARD_ICON] background-image: url("../../media/examples/lizard.png");
Understood.
@DanTup
This would be really nice in flutter where you already get icons on hover.
There is a way for a language server to return colors found in the code. But I miss a way to do the same with icons/images. Some editors display icons referenced in code so that the developer can visually see the icon and not only the path or name of the icon. The LSP should specify a way to tell a client about icons or images found in the code. I guess there are two possibilities for the payload:
I hope to see this feature in the near future. Would be good for CSS and other languages with images.