-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Support VS Code Default Language Icons #13014
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide a plugin with a language contribution that adds a custom default language icon, ideally a "known" language like python
Can you provide such a plugin? As far as I can tell, the builtin plugins don't contribute such an icon to any language.
packages/plugin-ext/src/main/browser/plugin-icon-theme-service.ts
Outdated
Show resolved
Hide resolved
b34850f
to
bb26c77
Compare
@msujew Thank you for having a look! I pushed an example to https://github.com/eclipse-theia/theia/tree/issues/13013_sample or you can download the zipped vsix:
|
@msujew are you reviewing this one? |
- Extend language service with necessary methods - Create CSS rules for contributed language icons - Use language icons if theme sets 'showLanguageModeIcons' - Ensure custom theme can override language icons
bb26c77
to
ec4e403
Compare
I rebased the branch onto main as there was a conflict in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the example plugin. This change works well for me 👍
I've encountered a very minor issue during testing. After installing the extension (but before changing the color/icon theme), any open editor keeps the old icon (while it correctly updates in the navigator). After changing to another theme, everything is updated as expected. This shouldn't stop this change from getting merged though.
@msujew Very good catch! I added a commit that should fix that problem. It was just adding an event so I thought it would be faster than to create a follow up issue ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for the update @martin-fleck-at 👍
The new changes look good as well. Now without any further critique :)
width: ${size}'px'; | ||
height: ${size}'px'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @martin-fleck-at, what is the intent behind the addition of these single quotes? I don't think this is valid syntax, these properties are just being discarded from the css stylesheet at the moment.
I'm taking a look in the context of #13096 btw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bvenreply, you are definitely right that they are not producing valid CSS syntax. My best guess is that I did it by mistake and for some reason just didn't notice. I don't see any reason why it would be like that as it is also not like that for any other pixel value. Thank you for discovering this! If you are already working on an issue I'd be grateful if you could take care of this but I can also create a separate change if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @martin-fleck-at, I believe I'll be able to take care of this myself in the course of #13096. If not I'll let you know.
What it does
Add support for default language icons similar to VS Code:
Fixes #13013
How to test
None
: no icons shownFile Icons (Theia)
: uses our default language iconMaterial Icon Theme
: uses icon from the themeFollow-ups
Review checklist
Reminder for reviewers