0

When releasing public repos on Github or during collaboration I want to make sure that we are on the same page and I get asked regularly what extensions I'm using for a project. After reading VSC docs I'm familiar with getting a list of extensions from "How can you export the Visual Studio Code extension list?":

code --list-extensions | xargs -L 1 echo code --install-extension

but is there a way to install all extensions by listing them in package.json for the project and for them to install with the command from either npm install or yarn add?

Closest I can find from searching is Cannot install extensions in visual Studio code and I cannot find anything on the VSC docs

DᴀʀᴛʜVᴀᴅᴇʀ
  • 5,839
  • 15
  • 57
  • 101
  • You could potentially develop inside a container - that’d mean you’d define the extensions once and each developer would have them installed when developing inside the container (see [docs here](https://code.visualstudio.com/docs/remote/containers)) – 0909EM Nov 14 '20 at 19:02
  • Does share settings work? [see this](http://shanalikhan.github.io/2016/09/02/how-to-Share-visual-studio-code-settings.html) and [this](https://stackoverflow.com/questions/35773299/how-can-you-export-the-visual-studio-code-extension-list) – 0909EM Nov 14 '20 at 19:13
  • @0909EM still cannot install the ext with npm or yarn install from reading those – DᴀʀᴛʜVᴀᴅᴇʀ Nov 14 '20 at 19:14
  • Are you aware of [Workspace recommended extensions](https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions)? – Álvaro González Nov 14 '20 at 19:23
  • @DarthVader - but why must it be done with yarn install? If you switched to developing in a container (which I’d recommend, it’s awesome for our Angular project) then every member of the team has vscode setup when the container is built - so not linked to yarn/npm, which might be helpful anyway if you were to move away from vscode in future – 0909EM Nov 14 '20 at 19:26
  • @ÁlvaroGonzález i did see that but still no ability to install the extensions. – DᴀʀᴛʜVᴀᴅᴇʀ Nov 14 '20 at 19:27
  • I'm actually confused by that part. Why do you need to install extensions from outside Code itself? Are they private extensions that aren't available in Marketplace? – Álvaro González Nov 14 '20 at 19:29
  • @Álvaro González yes some are validation extensions. – DᴀʀᴛʜVᴀᴅᴇʀ Nov 14 '20 at 19:31

0 Answers0