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

Automatically enable extensions/settings for workspace? #1

Open
cweagans opened this issue Apr 28, 2023 · 1 comment
Open

Automatically enable extensions/settings for workspace? #1

cweagans opened this issue Apr 28, 2023 · 1 comment

Comments

@cweagans
Copy link

Is there a way to avoid the manual step of enabling the extensions for a given workspace? Same question for settings -- can those automatically be set? There are other similar extensions that do this, but I much prefer your approach of allowing profiles to be mixed/matched! It would make sense if this was an opt-in feature, but this would make this plugin so much more useful IMO!

@baincd
Copy link
Owner

baincd commented Apr 29, 2023

Hi @cweagans,

Thank you, I appreciate the feedback!

The similar extensions that were around when I created this extension all worked by using hacks that were not officially supported by VS Code. In my opinion, the approaches these extensions take have inherent risks that jeopardize the stability of VS Code. The fundamental goal of this extension was to provide a stable solution to the problem using only the supported and publicly documented VS Code API.

Unfortunately this goal causes limitations, one of which is that there is no way to programmatically enable extensions via the VS Code API.

However, the workspace settings could automatically be updated by the extension. The tricky part is that the settings will likely include project-specific values (like a project key for Sonar). If the workspace settings were automatically updated, the end user would still have to open the workspace settings.json to update to the correct values, or else the settings would have incorrect/invalid values. That's why the approach I took instead prompts the user to manually add those settings (which the user can choose ignore if they wish and nothing is inherently broken). TBH I don't love how it accomplishes this right now, but it is good enough for me that I don't really have an appetite to modify it. But I am happy to consider suggestions and contributions for alternate solutions for how to handle profile settings.

Thanks,
-Chris

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

No branches or pull requests

2 participants