2

I added some extensions to VS Code, including python, c++, flutter, etc. I'm trying to disable some extensions in a specific repo, such as the flutter extension in my frontend repo. I want to save this setting in .vscode/ so that when I move the repo, VS Code will remember the setting.

starball
  • 20,030
  • 7
  • 43
  • 238
chenfwww
  • 21
  • 2
  • you can do it on workspace level, go to the page of the extension and disable/enable for the current workspace – rioV8 Aug 17 '22 at 04:16
  • related question, but not quite a duplicate-target: [How can you manage (force- not recommend) what extensions are enabled/disabled in a VS Code workspace with a configuration file?](/q/76919221/11107541) – starball Aug 23 '23 at 01:41

2 Answers2

0

In order to enable and disable the extensions for a certain workspace in visual studio code.

Go to the extensions on the sidebar and disable/enable for the current workspace. Adding screenshot.

extensions on the sidebar

To do this step by step:

On the Extensions sidebar.

  • Select the extension, then select the 'Disable' button. This will disable the extension for all workspace.
  • Then select "Enable (workspace)" to enable it for the current workspace.
JustAG33K
  • 1,403
  • 3
  • 13
  • 28
0

As far as I know, no. The information about which extensions you have enabled or disabled for a workspace is not saved in the workspace's .vscode/ folder. The best you can is recommend / recommend-against extensions to enable for the workspace using extensions.json (using the recommendations and unwantedRecommendations properties).

I'm not sure exactly where that information is stored, but I reckon somewhere in the place where VS Code stores the rest of your user data. On Linux machines, that's in ~/.config/Code. On Windows, it's in %APPDATA%\Code. On macOS, it's in ~/Library/Application Support/Code. It might be stored in the workspace database (./User/workspaceStorage/<workspace folder hash>/...)

starball
  • 20,030
  • 7
  • 43
  • 238