Hi @sobolevn, installing extensions as part of dotfiles poses some challenges, since dotfiles install runs in parallel with user connection, and there’s no guarantee you are connected by the time it runs, or even which VS Code version you are connecting from (insiders, stable, etc). Without knowing which VS Code version you are connecting from, you cannot know which version to install the extension into.
There are two alternative recommended methods for installing extensions automatically:
- Per-user extensions can be installed via settings sync in VS Code, which is enabled automatically in Codespaces. This will have a similar effect to dotfiles: they will be installed in all of your codespaces.
- Per-repo extensions can be specified in the devcontainer.json for a given repo. Then every user who creates a codespace in that repo will get that extension.
I would use (1) for extensions that are mostly personal preference like themes and other UI-related extensions, and (2) for things like language extensions, SDKs, debuggers, etc which are needed to build and run the project, and which everyone in that repo is going to need.
Hope that helps!