Add file explorer modal#43961
Conversation
|
Could you explain why this should be its own picker vs the existing file finder? Are we missing a key option on the file finder? |
|
@yara-blue - Just to make sure; did you read the PR description? I thought that was pretty well covered there, but maybe not. Or maybe there is a picker similar to netrw already in Zed that I have somehow missed these past couple years? |
To me it seems similar to |
|
Yes, I am very familiar with the file finder and it is discussed in the PR description above. I must admit, I'm a little confused by this conversation's approach 😄 . Again, I'd just note that this is all covered in the PR description above and if you try this picker (or have used netrw or Helix's file explorer) you'll know they are quite different things. I'm happy to close and wait for the extension system if you'd prefer not spending time on looking at this feature at the moment as I know there are a lot of PRs to sift through. |
|
I was short on time but did not want to leave you hanging, in hindsight that was wrong. My apologies. If I understand correct this PR proposes a new picker which could be seen like a combination of the file finder and project picker. One question is should this be its own picker or an option on the existing file finder? Some pros to extending the file finder:
Your PR description states a wider vision:
As long time vim user I achieve contextuality with You mention I see the work and effort you put in and truly it is great to see the community engage like this! This might however need some design work before we can ship code :( |
|
Thanks, @dvdsk - Trust me, I get it on the time crunch; I've been around this project for a long time and know there's a lot going on! There's no rush from my side. Anyway, don't sweat it. On to the PR discussion:
I think that's a pretty fair assessment. What it ended up being is pretty much a Zed-ified version of the File Explorer added to Helix here... https://helix-editor.com/news/release-25-07-highlights/ The main difference is there are no live previews in Zed. I actually had live previews going when tabbing/arrowing through this file explorer, but tore it out prior to opening the PR because I knew introducing a new picker could be a stretch, let alone introducing live previews. Even so, yeah, it's roughly approximating similar to helix's file explorer, netrw, yazi, ranger; really any typical file explorer. The key points being that it opens to a focused view of the directory of the file you're currently editing and that you can easily navigate to file in the same directory, up a level, and navigate directory-by-directory.
I'm not opposed to it being part of an existing picker; I just couldn't really make that work. The one I experimented the most with as mentioned in the description was the picker that opens via the Could something be added to the existing file finder? Maybe? As long as it displayed all the files in the current directory to explore and you move up and down directories. But then it seems like a pretty different thing. 🤷
I've tried over the years to use persistent project panels (e.g. nerdtree). It is just not a pleasant experience for me. I guess I just tend to work in codebases where the files near the current one are often somewhat related so I jump around to siblings or those just above or below. An explorer that pops up and displays only the files in the current directory allows me to immediately find my place and effortlessly jump to files near the one it was opened from. This is opposed to a full project panel where I look to the left and then try to get my bearings amongst a mass of directories/files; that just breaks flow for me. As for potential project panel changes, I think it would at least help if there were a command that would force close everything in the tree and open only the current directory with the current file highlighted. Probably that wouldn't be much of a lift that I could probably handle, but also I'd still be unlikely to use that panel anyway just because I can't 😆 All of this was mostly a solved problem for me in Zed via yazi integration. That works wonderfully...until you're remoting in to a container. Then you can open yazi in zed, but as soon as you select a file, there's no way to instruct Zed on the host to open the file in the current Zed window. As such, I've looked for ways to make this work well enough, but it's pretty much the project panel or the project panel :) I'm not super worried about it now that I've got the feature working as I run my own build anyway. But, of course, if there's an opportunity to get it or something like it in core, and if it is useful to others, all the better. |
* main: (155 commits) Add support for git remotes (zed-industries#42819) python: Improve sorting order of toolchains to give higher precedence to project-local virtual environments that are within current subproject (zed-industries#44141) Use buffer language when formatting with Prettier (zed-industries#43368) search: Fix sort order not being maintained in presence of open buffers (zed-industries#44135) bedrock: Support global endpoints and new regional endpoints (zed-industries#44103) linux: Spawn at least two background threads (zed-industries#44110) macos: Add missing file access entitlements (zed-industries#43609) Re-colorize the brackets when the theme changes (zed-industries#44130) Reduce priority of Windows thread pool work items (zed-industries#44121) Update fancy-regex (zed-industries#44120) Prefer to disable options over hiding (git panel entry context menu) (zed-industries#44102) tab_switcher: Subscribe to workspace events instead of pane events (zed-industries#44101) editor: Add active match highlight for buffer and project search (zed-industries#44098) Add more preview tab settings and fix janky behavior (zed-industries#43921) ai: Add an eval for the inline assistant (zed-industries#43291) Fix circular reference issue around PopoverMenu again (zed-industries#44084) Run `git2::Repository::find_remote` in the background (zed-industries#44092) Improve support for multiple registrations of `textDocument/diagnostic` (zed-industries#43703) Revert "http_client: Add integrity checks for GitHub binaries using digest checks (zed-industries#43737)" (zed-industries#44086) editor: Fix blame hover not working when inline git blame is disabled (zed-industries#42992) ...
|
@Dima-369 Thanks for taking a look! The modal height has been changed to the default for the picker and matches should now be highlighted. Also the "ignore" option has been completely removed. This tries to stick to a lot of the same precedent as set in modals like the file_picker, but I don't really think the ignore option is nearly as relevant when you're navigating directories as it is when you're searching across an entire project. If this is necessary it could be added in the future and likely alongside "Settings Support" mentioned in the added "Future Considerations" section of the PR description. |
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: David Baldwin.
|
2fb7b33 to
74955fd
Compare
|
Re: #44530 (comment) - Thanks, @maxbrunsfeld, I'll be happy to re-work this based upon #44530 if/when that one lands. |
After reading through this thread I'm pretty much convinced that we actually do want to go this route. The existing
I think I'll close this for now and make an issue with the above feature requests. Let me know if there's additional functionality you think that picker would need, but unless it's really big stuff I don't think it's worth having a divergent implementation when the existing one is so close to the desired behavior. |
|
Thanks, @P1n3appl3, I'll push up where I got on that original |



Update: 12/15/2025 - Per #44530 (comment) holding on this one until that PR lands. Maintainers feel free to close as needed for now.
Summary
Adds a new file explorer modal that provides hierarchical directory navigation as an alternative to the fuzzy file finder, open path prompt, and project panel. This allows users to browse files directory-by-directory with focused, contextual navigation - appearing in the center of the screen rather than in a persistent sidebar.
Motivation
Zed offers several existing ways to navigate files:
However, each has limitations:
What's missing: A way to hierarchically browse files that's contextual (starts where you are), focused (one directory at a time), and centered (doesn't require looking to a sidebar).
Inspiration from Vim's netrw:
Many Vim users appreciate netrw's approach of opening a file browser in the current context. While a full in-pane implementation doesn't fit Zed's architecture, the modal file explorer captures the essence of this workflow: quick, contextual, hierarchical navigation without leaving your working area.
This feature provides an additional navigation option that combines strengths from existing tools: hierarchical browsing like the project panel, modal presentation like the file finder, and contextual starting point based on your current file.
Features
Core Functionality
UI & Interaction
enable_preview_from_file_explorersettingUsage
Trigger via
file_explorer::Toggleaction (no default keybinding). The modal can be dismissed normally, and submenus (filter/split) properly prevent dismissal when focused.Multi-worktree workflow:
Actions
file_explorer::Toggle- Open/close the file explorerfile_explorer::NavigateToParent- Navigate to parent directoryfile_explorer::ToggleFilterMenu- Toggle filter optionsfile_explorer::ToggleSplitMenu- Toggle split menuImplementation Notes
file_explorerPickercomponent with custom delegateAlternative Approaches Considered
Enhanced Open Prompt
Initially explored adding an "Open in Current Directory" feature to the existing open prompt (
workspace::Open). This would have allowed the file path picker to default to the current file's directory with preselection.Why not chosen:
In-Pane Navigation (netrw-style)
Explored implementing an in-pane file browser similar to Vim's netrw, where the browser would replace the current editor pane and allow navigation within the pane itself.
Why not chosen:
The modal approach fits naturally with Zed's existing navigation patterns, doesn't disrupt workspace layout, and includes multi-worktree support through a hierarchical selection view - allowing access to all worktrees without needing a persistent panel.
External TUI File Manager (e.g., Yazi)
An existing workaround involves launching a TUI file manager like Yazi via Zed's terminal and task system (see discussion #9067). This provides a powerful, vim-style file browsing experience through custom keybindings and wrapper scripts.
However, this approach has significant limitations:
A built-in modal provides a consistent, zero-configuration experience that works across local and remote contexts.
Future Considerations
modal_max_width,file_icons, etc. could be added later.Screencasts
Basic Navigation
Multi-Worktree Support
Release Notes: