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

[FEATURE] - Ability to easily select a folder that is accessible to all workspaces #462

Closed
fade2gray opened this issue Jan 31, 2021 · 7 comments

Comments

@fade2gray
Copy link

fade2gray commented Jan 31, 2021

Would it be possible, from the Project Manager sidebar, to add the functionality to select a folder or folders from a file explorer that can be made common to all listed favourites, without having to manually add a common folder to the root of all projects/workspaces?

I hope that makes sense.

@alefragnani
Copy link
Owner

Hi @fade2gray ,

I'm not sure I understood your idea.

Do you mean select/define folders which should be automatically added to some opened folder and or workspace? Doing so, anytime you open a single folder, the VS Code window would become a multi-root workspace with that folder(s) added. Or, anytime you open a multi-root workspace, it will be updated with new those folder(s)?

If that's not the case, could you explain a bit more what you need?

Hope this helps

@fade2gray
Copy link
Author

Capture-projectmanager

@alefragnani
Copy link
Owner

People say an image worth more than a 1000 words, but sometimes a few words help 😁 .

I see an alternative approach to what I described in the previous comment.

Do you want an option/action/button to select some random folder, and add this selected folder to every Favorite Workspace? Like a bulk edit.

@fade2gray
Copy link
Author

fade2gray commented Feb 1, 2021

Yes, maybe a folder on the desktop that contains a to-do list that I would like to see accessible from all projects without having to add that folder/file individually to all workspaces. Does that make better sense?

├─Workspace-1
│    └─Desktop/folder/to-do.list
├─Workspace-2
│    └─Desktop/folder/to-do.list
├─Workspace-n..n
│    └─Desktop/folder/to-do.list

@alefragnani
Copy link
Owner

Oh, right! I'm wondering if this makes sense to the extension, but I think is doable.

The only downside I see is it would be made "manually", because there is no API available on VS Code for that. The current available API only works if you open the Workspace (.code-workspace file).

Thanks for the suggestion

@fade2gray
Copy link
Author

Yes, feature requests I've made previously tend to end up hitting the 'API wall'. Oh well, a script to hack the .code-workspace files it is then. 😁

@alefragnani
Copy link
Owner

Yes, some APIs are not as powerful as we need, but they tend to evolve from time to time. This one in particular, I didn't find any related issue open, but could be asked.

Instead of a script to manually update all selected workspaces (.code-workspace file), you could detect when a Workspace is opened, then add the desired folder to the Workspace. Simply use the vscode.workspace.updateWorkspaceFolders API. If, for some reason in the future, you need to replace the desired folder, the same API works as well.

I guess, your idea alone, is already an interesting extension to be published. Didn't you find anything similar on the marketplace? Aren't you interested in publishing yourself?

Hope this helps

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

No branches or pull requests

2 participants