-
Notifications
You must be signed in to change notification settings - Fork 53
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
The default label for multiple declarations is not useful #973
Comments
I'm not sure I understand what you're talking about. Can you please submit some screenshot of the particular UI element being discussed? |
Yes, an screenshot with and without your PR would be very helpful. I know how it currently looks like, but I am not sure about how it would look like after |
I am unsure on this change. I see how in some cases the declaration line might be useful, but the URI might be as well quite relevant. Would the problem be solved if the dropdown menu that shows the URI would be wider? |
Showing the line content can be helpful, but it IMO usually seems more important to show the target location as well (and not only its content). Also not that in some cases, the first line of the declaration might not be so interesting. It could for example be the start of a comment. The line content might be a nice addition as a suffix, but we'd need more space. |
In my case all declarations are in the same file so there is no way to distinguish a declaration from its URI. Maybe this choice should be done by the language implementation via an extension point ? This extension point could include other labels as well. |
I fear it's a dangerous to have extension points for it, as at such pace, we'd start maintaining dozens of extension points for everything. How does VSCode behave in this case? Maybe adding a "label" to LocationLink in the spec would be the best way forward. |
I understand, in the mean time could:
be an option ? |
At least for our use cases, the file name would not be enough, the folders are also relevant. I wonder, for the cases where the URI is not enough, should one not use type hierarchy? Would that work for you? |
No those are declarations not related to types in the language. I'll try to find a workaround... |
I provided my own |
The computed label for multiple declarations is the name and the path of the resource with is not really useful as an end user.
It would be better to display the line declaring the symbol so the used can select the relevant entry. This could be done at least for
IFile
from the workspace since we can have the encoding and the stream to read its content.The text was updated successfully, but these errors were encountered: