-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 tree views to use icons for symbol kinds on their nodes #45057
Comments
Closing this in favour of #5605 which is something we will do within the next 2 or 3 milestones |
@jrieken That sounds good - though in this case this is a specialised tree and not the normal symbol view of my document (it's a sort of render tree we build from static analysis to help the user visualise their UI). With #5606 will it be possible to have a custom tree that can render in a similar way (eg. both a stanadard symbol tree and this custom tree)? |
Yeah, should be possible... The idea is to extend the DocumentSymbelProvider so that it can return hierarchical data. However, the idea is also to allow for different representations of that data, e.g. a break-crumb and/or a tree. Also likely that the tree will sit where the minimap sits. What you are trying to achieve seems a little further away from "normal" outline, tho there is no normal outline... |
@jrieken Yeah, I understand our need is somewhat unusual. Using the DocumentSymbolProvider for this would feel a bit weird since it's not semantically the same. Another possible option might be to provide us with a way to get the |
cc @sandy081 who is doing some work on icons |
Last milestone we introduced constants to represent themed folder or file icons. May be this can be done using similar approach? @jrieken Are there constants in the API representing document symbol icons? |
I don't know if this answers the question but there's an enum named |
That doesn't sound right to me... I think we should make them part of the themes and, assuming my understanding of themes is correct, make them reusablable by that |
Ok, Makes sense. |
agree. |
Is it likely there may be any progress on this in the near future? I'm currently thinking about just taking a copy of the icons from here and periodically updating them. It doesn't feel like an ideal solution, but users have been asking for a Flutter Outline for well over a year and I'd really like to deliver something. |
No progress.. also given that outline view is provided out of the box, not sure if it is needed for other extensions. |
I tried many times to use the built-in outline, but it does not support being extended as required here and I was guided towards a custom tree. Specifically, it does not have:
I'm also not sure it has selected events, which I'd also need to set contexts correctly so my context menus can work. I've got prototypes going both ways, but neither are great. I would prefer to extend the built-in outline, but more requests have been rejected for supporting that than the custom tree, so I figure it has to be this way. |
The request to use the VSCode icons in extensions is #31466 |
Yeah, this is a dupe of that. Like everyone else, I've just copied all the icons from VS Code into my project 😞 |
To display icons in explorer trees we can either pass a path or use
resourceUri
, there's no way to re-use icons used elsewhere in code for symbol types (for example in the workspace symbol searches).This means that extensions with trees representing code have to ship their own icons (for ex. the "Code Outline" extension has its own: https://github.com/patrys/vscode-code-outline/tree/58008bfa3cc36ad2c18df53b2b4e53dc10a75d55/resources/light) which means they may not be consistent with the icons rendered elsewhere in code.
Is it possible to add something like a
symbolKind: SymbolKind
?The text was updated successfully, but these errors were encountered: