DEV Community

Discussion on: VS Code Profile Switcher Extensions Support

Collapse
 
equiman profile image
Camilo Martinez

Could you explain better how SyncExtension deal with this?

Upload the current profile? Or upload all profiles?

Thread Thread
 
aaronpowell profile image
Aaron Powell

Are you referring to Settings Sync?

Settings Sync works by taking a copy of your settings.json and uploading it to a gist, along with the metadata of your currently active extensions (and a few other pieces).

Since my extension also uses the settings.json file to store everything they'll get uploaded with Settings Sync. I actually use that myself to sync between VS Code and VS Code Insiders (easiest way to have 2 independent installs!).

Thread Thread
 
equiman profile image
Camilo Martinez

OK, perfect. This weekend I'll create my profiles: Vanilla JS/Angular/.Net. :D

Thanks!

Thread Thread
 
equiman profile image
Camilo Martinez • Edited

I already tested your extension, thanks for your work it's amazing. It's a good way to deal with extensions on vscode.

I have some comments about, after tested.

  1. I think "profileSwitcher.storage" it's unnecessary because vscode have 2 files for configuration.
    User configuration for general purpose and project settings (.vscode/settings.json) for specific configurations. Then you can setup those changes on this files.
    I understand some user can found it useful and I'll recommend add a property to disable with a property.

  2. I have a problem when work with two kind of projects (C# and Web), because when switch between profiles are installing and uninstalling extensions but this apply to all vscode session. That's how works vscode currently and it's not the extension fault, you can use it, but can't work on different kind of projects.
    Instead of install and uninstall I think a solution can be save on each profile a list of extensions to disable. When switch to this profiles, disable those extension on current project. But i have no idea how difficult is do that.
    Until that a workaround could be work one session on vscode and other on insiders version.

  3. ¿It's there a way to add a property on project setting (.vscode/settings.json) to select automatically a Profile?

Thanks again. Amazing job!
Let me know if can help testing something.

Thread Thread
 
aaronpowell profile image
Aaron Powell

Thanks for the feedback Camilo, I'll answer in reverse order (and they are easier to answer that way!).

3. Currently no, the only "auto-select" for a profile is when you go into Live Share. That said, it's something I was thinking about last week and may add if there's demand (would just need to work out how best to do it).

2. Alas there's no way for me to disable extensions, it's uninstall or nothing, see this comment: dev.to/aaronpowell/comment/dd3a

1. I made a deliberate decision to not use the .vscode/settings.json file as the place I update for a few reasons. The main reason is that I don't want to do anything that runs the risk of corrupting the current git repo. If the extension updated a file tracked in git then it's a (potential) commit you have to make and a diff that needs to be explained. I'd prefer to not do anything that run the risk of modifying a file that everyone on the team relies on.

Another reason is that I originally wrote this extension for when I give talks. I have to remember to switch my settings to make it optimised for viewing on a projector, and I want those settings across all instances I have open (I may use several demos in a talk). So yes, it was partially built around a workflow I needed.

Lastly, you can already do workspace-specific settings by just using the .vscode/settings.json to what you need (I use to do that for repos explicitly used for presenting), so I didn't want to replicate functionality that already exists.

Hope that explains my thought process/reasoning behind some decisions. 😊