Skip to content

Highlight Parent Folders in Explorer Tree for Active File #250115

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

Open
kenn opened this issue May 30, 2025 · 4 comments
Open

Highlight Parent Folders in Explorer Tree for Active File #250115

kenn opened this issue May 30, 2025 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues
Milestone

Comments

@kenn
Copy link

kenn commented May 30, 2025

When a file is selected in the Explorer, only the file itself is highlighted. This makes it difficult to quickly identify the parent folder structure — especially in deeply nested trees.

Example:

app/
  routes/
    auth/
      login
      logout
      signup
    home/
    * index ← only this file is highlighted

It would be much clearer if all ancestor folders were visually highlighted (or styled differently) to reflect the currently active file path:

* app/
  * routes/
      auth/
        login
        logout
        signup
    * home/
      * index

Benefits:

  • Improves navigation clarity in large projects
  • Reduces cognitive load when switching between files
  • Makes the current context obvious at a glance

Possible Implementations:

  • Add a setting like "explorer.highlightActiveFileAncestors": true
  • Allow customization via theme tokens (e.g. explorer.ancestorFolderHighlight)
  • Reuse the breadcrumb logic to track and apply styling

Notes:

Breadcrumbs do help, but they're separate from the Explorer and easy to overlook. This change would provide a more intuitive, visual cue directly in the tree.

Would love to see this added — thanks for the great work on VS Code!

@lramos15 lramos15 added feature-request Request for new features or functionality file-explorer Explorer widget issues labels May 30, 2025
@lramos15
Copy link
Member

Does the tree sticky scroll help here?

@vs-code-engineering vs-code-engineering bot added this to the Backlog Candidates milestone May 30, 2025
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@RedCMD
Copy link
Contributor

RedCMD commented May 30, 2025

@lramos15
Sticky scroll doesn't target the active file
it only helps with any parent folders offscreen
but the on screen folder structure could still be a mess
and your assuming the active file is even visible

and there can be multiple ways to get to the active file
this feature should highlight all of them

all the code for it is already there
as if you create an error in a file, vscode will mark all of its parent folders with red/error icon

Copy link

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues
Projects
None yet
Development

No branches or pull requests

3 participants