alefragnani / vscode-project-manager

Project Manager Extension for Visual Studio Code
GNU General Public License v3.0
1.96k stars 228 forks source link

[FEATURE] - Option for multiple Projects Location Folder #712

Open cheesyMan opened 1 year ago

cheesyMan commented 1 year ago

Hi, would it be possible to support a multiple Projects location folder option (projectManager.projectsLocation)?

Something like this: Snipaste_2023-11-12_11-47-29

I happen to work back and forth on Mac and Windows machines and I have my VSCode settings and preferences syncronized.

Currently, this option accepts only a string for a single folder so, when I change this option - let's say in Windows - it gets syncronized on the Mac as well.

Then, when I open VSCode on the Mac I cannot find my projects anymore.

So, I have to change the option on the Mac, but then it gets syncronized with the Window instance of VSCode and I have the same problem again when I go back to Windows.

Alberto

alefragnani commented 1 year ago

Hi @cheesyMan ,

I wonder if instead of the Favorite Projects, you could use the _auto-detect _feature for Git, VS Code, regular repos. With it, you could add all folders, from all machines, and the extension would detect those that exists on each machine.

Hope this helps

cheesyMan commented 1 year ago

Hi @alefragnani, thanks for your suggestion.

But I'd say that - although it's an alternative - it lacks some very useful features of the Favorite Projects option.

Using the Git base folders - afaik - tags cannot be added, and so projects cannot be filtered.

alefragnani commented 7 months ago

Hi @cheesyMan ,

Looking closer to this multiple location approach for the projectManager.projectsLocation, I guess we should have a few issues. I mean, how would be possible to determine in which of the files should new projects be saved? Would the extension check for duplicates?

Instead, maybe an alternative would be to support storing the projects directly in the settings. Doing so, you would have a centralized location for all the projects, the list of projects would be in sync in every machine you use, even remotes. Sure, only the found projects would be available on each machine, but the list itself, would still exists in one place.

I wonder if doing so would solve #525 as well. I guess it would, at least for users that has a small set of projects, or for those that doesn't care with the length of the settings file.

TBH, I was against this approach in the past, but neither Settings Sync nor Remotes were available back then. The time has changed...

What do you think?

cheesyMan commented 7 months ago

Hi @alefragnani, sorry for the late reply.

As to the "saving" issue, one solution could be to ask the user in which of the possible projects.json files (if the user has set more than 1 alternative folder) he wants to save the project? 🤔 I honestly don't know what kind of technical difficulties this approach could show on the programmer's side (yours 😄).

As to the settings solution, it has the advantage of being synced across every machine, but on some machines it would show projects that actually don't live on that machine.

Regarding the settings file size, I personally don't see this as a problem (at least not for me). I don't know if an excessively huge setting file can lead to performance issues on VSCode (?) but if it's the case, a very big projects.json file wouldn't have this problem as well?

Coming to the more practical side of the problem, at the moment my approach is to have turned off Setting Sync for the projectManager.projectsLocation setting, so I have a different folder set on each machine and each machine searches projects on its own folder. Obviously I need to add a new project to each machine if I plan have it available on all of them.