neves
neves

Reputation: 39333

VSCode: What is the best way to commit a list of extensions to be used by VSCode in a project?

I'd like to standardize the use of some VSCode extensions in a project. I'd like to make it easy to install and activate some predefined list of extensions in VSCode.

As an exemple, I really like the stack analysis bash extension Shell Check. I can commit the configuration activating it, but if the other developer does not have it installed, it wouldn't work.

Is it possible to commit a file to my project listing a bunch of extensions to be automatically installed?

Upvotes: 2

Views: 1254

Answers (1)

rioV8
rioV8

Reputation: 28713

You can add extension recommendations to .vscode see: Workspace recommended extensions

Basically you must commit a file .vscode/extensions.json with contents like:

{
  "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}

Now every time someone opens your project, she will be asked to install the recommended extensions. Remember that the user can still reject to install, so it isn't guaranteed that the extension will be used.

Upvotes: 5

Related Questions