-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
FileSystemProvider and uri labels #51446
Comments
Not sure that's a good idea. I think we should use the workspace space information. Often you have a config like this {
"uri": "remotehub://github.com/rogpeppe/godef",
"name": "godef"
}, and when that's the case we should replace |
I would not tie this into the workspace file because we know that we at one point probably will support to open a remote folder without having a workspace file. So we will always have a situation where a remote URI does not have a meaningful name (same applies when actually no name is provided from the workspace file in the first place). Nevertheless, if that Can we come up with some heuristic to convert a remote URI to a meaningful label without having to go to each file system provider? We already expect the remote URIs to be in a folder-like hierarchy, so we could just show that part + maybe some indicator that the resource is not local but remote? |
I think using a workspace folder name is the most simple heuristic that there is. Sure, there must not always be one but its a straight forward thing to add, easy to implement, and doesn't put us in a bad spot. I think pinging the extension (host) for every URI that we want to render is slight overkill and I wouldn't know what recommendation to give to extension authors.
That would only work if things are unique, right? I can easily have
When you say "tie" you make it sound like a dependency which I think its not. It about pragmatically using that information if its around, e.g use it in the getPathLabel-function |
We are now showing a name of the workspace as a prefix to the relative path (only when in a multi root workspace). If the workspace name is not specified in the workspace configuration file we use the basename. Currently we distuingish the root name from the rest of the label with a centered dot • @bolinfest @hansonw @siegebell try it out from tomorrow's insiders and let us know how the labels feel |
also fyi @eamodio |
Closing as I did not recieve any negative feedback. Feel free to create follow up items if something can be improved more here. Thanks |
Currently for non file uris we always show the full
uri.toString()
as a label.Code pointer
However this should be contributed by the
fileSystem
provider such that for eachuri
alabel
can be provided.Doing this logic on the vscode side alone seems tricky since for some uris it is useful to show the authority (like
ftp
for example) and for some it is just noise.Let me know what you think @jrieken @bpasero
The text was updated successfully, but these errors were encountered: