-
Notifications
You must be signed in to change notification settings - Fork 29.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
Allow QuickPickItem to have file icons #232439
Comments
ThemeIcon
to use language theme iconslanguageid
as id
in ThemeIcon
to use language theme icons
Martin owns ThemeIcon's... I'll let him drive this one. If you want a separate issue that is specific to QuickPick having a |
There are two different types of icons:
If your goal is to have the same icon as in the explorer or editor title: then use ThemeIcon.FILE and set a resource. We need a resource name for that given the multiple ways that associations work. The resource doesn't have to exist. If you want to have a Python icon that is always available, but might not match what's in the explorer: There's one thing we could do. Language providers have a way to contribute a default icon. It is used as a file icon if a file icon theme shows icons does not define an icon for a language. We could also register that one as a product icon.
|
For Quickpick, Terminal, I want the |
Ok, then assigning this issue to @TylerLeonhardt for Quick Pick... |
languageid
as id
in ThemeIcon
to use language theme icons
Based on the response @aeschli doesn't think we should allow the language id in the ThemeIcon and Karthik is satisfied with that answer so long as we address the gaps in QuickPick and Terminal APIs. I already have a quick pick one #59826 @karthiknadig were you able to find a Terminal one? If not, can you open one? |
@TylerLeonhardt Created #233354 for Terminals |
Should we close this in favor of #59826? |
Currently, there is no explicit way to set the theme icon for items in
QuickPickItem
,Terminal
,TreeViewItem
to a specific language Icon.TreeView supports an indirect way where you need to set
resourceUri
to a file (likesomething.py
), andiconPath
toThemeIcon.File
. This allows core to calculate the icon. But there is no way to sayiconPath = new ThemeIcon('python')
.Such a feature is not available in QuickPicks or Terminal (
iconPath
). ForQuickPick
, the uses cases include selecting a start-up script or set of files for some task. For,Terminal
, in python extension we can have dedicated terminal per file, and we would like to show the icon of the file there.Related: #124363 , #59826
The text was updated successfully, but these errors were encountered: