Skip to content

Ability to define user specific customizations.vscode.extensions #295

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

Closed
rickyjames35 opened this issue Aug 20, 2023 · 5 comments
Closed

Comments

@rickyjames35
Copy link

The ability to automatically install VS Code extensions into a devcontainer using customizations.vscode.extensions offers great convenience. However, when collaborating within a team, it's advisable to limit the installation to only those extensions that are essential for the project. For instance, consider ms-vscode.cpptools-extension-pack and ms-vscode.cmake-tools.

The question arises whether it's wise to automatically install even the essential VS Code extensions into a devcontainer, as the recommended approach is to maintain devcontainers in an IDE-agnostic manner. This, of course, leads to a separate discussion.

Nonetheless, many developers have specific extensions they prefer, such as Rainbow Indent and Github Copilot. With devcontainers, there's a need to reinstall these extensions each time the container is rebuilt. One method attempted involves volume mounting /home/remoteUser/.vscode-server. However, this approach presents permission issues and potentially other challenges.

Are there established best practices for effectively managing this situation?

@samruddhikhandale
Copy link
Member

Hi 👋

Thanks for opening the issue!

However, when collaborating within a team, it's advisable to limit the installation to only those extensions that are essential for the project. For instance, consider ms-vscode.cpptools-extension-pack and ms-vscode.cmake-tools.

@rickyjames35 Are you looking for a mechanism to opt out of extensions which gets added to the dev container (either by an image or Features)? Wondering if devcontainers/features#386 could be helpful in your case.

Nonetheless, many developers have specific extensions they prefer, such as Rainbow Indent and Github Copilot. With devcontainers, there's a need to reinstall these extensions each time the container is rebuilt. One method attempted involves volume mounting /home/remoteUser/.vscode-server. However, this approach presents permission issues and potentially other challenges.

How about using VS Code Settings sync? See https://code.visualstudio.com/docs/editor/settings-sync, however, in this case it needs to set per user account. Hence, I believe #22 might be more appropriate in your case.

@rickyjames35
Copy link
Author

Are you looking for a mechanism to opt out of extensions which gets added to the dev container (either by an image or Features)? Wondering if devcontainers/features#386 could be helpful in your case.

Not looking for a way to opt out. I'm looking for a way to automatically install user specific extensions into a devcontainer.

How about using VS Code Settings sync?

I believe this will just sync the settings for extensions, it won't actually install the extensions into the container.

@bamurtaugh
Copy link
Member

Settings Sync should bring your extensions to new devices! Please let us know if that's not what you're observing.

@rickyjames35
Copy link
Author

Actually this is what I was looking for thanks
https://code.visualstudio.com/docs/devcontainers/containers#_always-installed-extensions

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

3 participants