1

Is there a way to enable/disable some specific list of extensions for different kinds of projects in VS Code? e.g. have enabled c# test explorer when I'm working in python project is redundant - this at least clutters space. I can disable some extensions manually of course, but is there some more automatic way to do this?

Gama11
  • 31,714
  • 9
  • 78
  • 100
  • go to the extension page and disable it for the current workspace – rioV8 May 08 '21 at 14:06
  • yes, this is a way I'm using currently. but I'm looking for some more automated solution to disable many extensions at once for some workspace. we have many repositories plus my own and disable each extension for each of them manually not really handy – Viktor Doroshenko May 08 '21 at 14:23
  • See https://github.com/microsoft/vscode/issues/92393 – Mark Jul 18 '21 at 16:00
  • Does this answer your question? [Is there a way to toggle VS Code extensions per project?](https://stackoverflow.com/questions/71268372/is-there-a-way-to-toggle-vs-code-extensions-per-project) – starball Aug 17 '23 at 10:01

3 Answers3

3

You can disable an extension globally and only enable it for a specific workspace. See: https://github.com/microsoft/vscode/issues/15611#issuecomment-346179926

enter image description here

Betty
  • 512
  • 7
  • 19
1

I've actually been bashing my head against this recently and found that VSCode has actually implemented this as part of the Profiles functionality.

Profiles were introduced in then January 2023 update (version 1.75)[https://www.infoworld.com/article/3687049/visual-studio-code-175-brings-configuration-profiles.html#:~:text=Microsoft%20has%20rolled%20out%20the,offers%20easier%20multi%2Dview%20resizing.]

Here's what I just finished doing...

  • Create a new Profile for a style of development (e.g. Web Development, Azure IaC, etc) based on my Default profile.
  • In that Profile, uninstalled each extension I didn't need
  • Switched back to the Default profile, and verified all the original extensions were still there

Repeat for each type of development I'm doing

NLInnett
  • 63
  • 7
  • Another vote for Profiles. I posted a similar note in a related question today : https://stackoverflow.com/a/77019512/190955 – TonyG Aug 31 '23 at 22:17
0

You can also do this using the Visual Studio Code CLI:

> code --new-window --disable-extension $EXTENSION_ID /path/to/project

To get the list of extensions:

> code --list-extensions
christian-kohler.path-intellisense
eamodio.gitlens
eriklynd.json-tools
Ko Ga
  • 856
  • 15
  • 25