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

feat: collapseNodeModules feature #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

zardoy
Copy link
Owner

@zardoy zardoy commented Jun 18, 2022

Disabled by default as it can be annoying
In theory it can be useful to toggle globally e.g. on absolutely any tab reselect
To see in action:

  1. Go to any file under node_modules
  2. Close the file
    -> node_modules is collapsed

@zardoy zardoy requested a review from Ilanaya June 18, 2022 07:56
Copy link
Collaborator

@Ilanaya Ilanaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I'd rather prefer a command for collapsing node_modules - for me it would be much more useful.
I didn't find cases when this setting would help me in work right now, especially when it collapses all project folders, but I don't mind implementing it disabled by default

@zardoy
Copy link
Owner Author

zardoy commented Dec 8, 2022

The problem that was motivation for that feature no longer exists since explorer.autoRevealExclude setting is here.

though they should definitely add explorer.autoCollapseInclude

@Ilanaya
Copy link
Collaborator

Ilanaya commented Dec 8, 2022

The problem that was motivation for that feature no longer exists since explorer.autoRevealExclude setting is here.

though they should definitely add explorer.autoCollapseInclude

I'm okay with autoRevealExclude rn. I think we can close.
Is there still no way to collapse a particular folder in the project?

@Ilanaya
Copy link
Collaborator

Ilanaya commented Dec 8, 2022

As an idea - can we close all dirs in project and then invoke workbench.files.action.showActiveFileInExplorer. This version might be much more useful if we'll somehow determine the last viewed editor, which doesn't belong to the node_modules, set it as active and call mentioned command.
@zardoy WDYT?

@zardoy
Copy link
Owner Author

zardoy commented Dec 8, 2022

Yes, this is a good idea, I'm using it in keybinding and it works, you can test it here and if you like it , you can merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants