-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
Auto Collapse Folder Tree when closing files #45362
Comments
(Experimental duplicate detection) |
Same issue -> Ability to keep only the current directory expanded in the Explorer (#39025) |
The link provided in the previous issue does not provide that much help. extension is not available in the marketplace |
There's a
Then, after reloading/restarting vscode, it works as expected. The only downside I've seen so far is that it has a bit of a jarring/flickering effect when switching between files in different folders, and you can't exclude specific folders from auto-collapsing. I might take a stab at adding that in the future, but for now this will do. |
The problem with the given extension is that it collapses all folders to then reopen the active file and this causes the Explorer tree to blink. I was trying to make a proper extension that would handle this correctly, but there's no access to the Explorer tree in the API. I also tried fiddling with VS Code's source but I couldn't find any reliable way of finding a tree model ( If anyone is willing to help, I'd be more than appreciative. |
This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
Would love to have this feature, will be very useful in a monorepo setup. |
If anybody tried searching for an extension and couldn't find a solution, here's the extension that worked for me: https://marketplace.visualstudio.com/items?itemName=lukegeneva.auto-collapse-explorer |
VSCode's feature on opening the file's tree on the sidebar is great, also showing it when the file is active on the editor. I was wondering if it's possible to collapse the file's tree when the file is closed?
The text was updated successfully, but these errors were encountered: