Skip to content
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

Show breadcrumbs navigation when going to definition #850

Closed
nounder opened this issue May 15, 2023 · 5 comments · Fixed by denoland/deno#20030
Closed

Show breadcrumbs navigation when going to definition #850

nounder opened this issue May 15, 2023 · 5 comments · Fixed by denoland/deno#20030
Assignees
Labels
enhancement New feature or request high priority

Comments

@nounder
Copy link

nounder commented May 15, 2023

Is your feature request related to a problem? Please describe.

When I Go to Definition of a symbol from a deno.land (or any other HTTP source), an editor opens with a file where that symbol is defined. However, the editor does not have breadcrumb navigation (just below tabs) that allows to see file hierarchy in which this file resides. This makes it hard to explore new packages without leaving programming environment.

Describe the solution you'd like

A breadcrumb navigation should be accessible in editor visiting remote module. Because there are many Deno packages that have high quality code, it is often enough to go through source code to understand it. Currently one has to use external tools which breaks the flow for a programmer.

Screenshot 2023-05-15 at 21 05 19
@bartlomieju bartlomieju added enhancement New feature or request high priority labels Jul 10, 2023
@bartlomieju bartlomieju mentioned this issue Jul 11, 2023
17 tasks
@bartlomieju
Copy link
Member

I took at stab at that and it appears the problem is that the remote dependencies are marked as "read-only" files which makes them not available to display breadcrumbs. I need to dig more to figure out if this is something we can change or now.

@bartlomieju
Copy link
Member

The other problem might be that we don't register a "file provider" for http: and https: URL, but I'm still trying to figure out if we should.

@bartlomieju
Copy link
Member

I did more digging and clicking on a http: or https: URL is actually causing to open a "virtual document". Virtual documents are "readonly" documents (as can be seen by trying to enter something in the opened document).

I believe this is a limitation of VSCode in that it doesn't show breadcrumbs for this virtual documents. @dsherret suggested that we should allow to edit documents in the global cache, so I'm afraid this might be a "wontfix".

@nounder
Copy link
Author

nounder commented Jul 21, 2023

One more possibility is using deno: URL with Deno-specific file provider. When user clicks import, the URL is rewritten to be handled by extension itself without overriding default behaviour.

File System API seems to provide fs-like abstraction for custom handles.

@dsherret
Copy link
Member

dsherret commented Aug 2, 2023

It's infeasible to do this for the global cache because we don't have a reverse mapping of file path to remote url. The upcoming deno_modules directory feature will support this though so this issue will be closed by denoland/deno#20030

dsherret added a commit to denoland/deno that referenced this issue Aug 2, 2023
Closes #20015
Closes denoland/vscode_deno#850 (only for
deno_modules, but I don't think this will be possible for the global
cache)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants