15

Idea:

I wanted to clean up my vscode extensions, because I'm working with a lot of different languages/file types and having all these extensions installed and enabled at once is just too much.

Problem:

I disabled some extensions for a specific workspace, and wanted to copy these settings to another workspace, but vscode is not storing the information about enabled/disabled extensions in .vscode/settings.json.

Questions:

  1. Is there any way to copy these settings from one workspace to another?
  2. Is there a better way of dealing with lots of extensions?
  3. Can you recommend tools/extensions for managing extensions per workspace or language(s)

I assume vscode is not loading all extensions at once, but rather when needed. But some extensions display icons on the left or bottom of the window and overcrowd the "Show All Commands" list/search.

3 Answers 3

8
+25

VS Code stores this info in its internals instead of the .vscode folder, so you can't copy this info between workspaces. There is an open issue asking exactly what you want.

But, you have an alternative. Use the Profile Switcher extension.

Its description:

This extension allows you to define a number of settings profiles that you can easily switch between. The original idea for this extension came from my desire to have an easy way for me to switch my VS Code to a setup that was better optimised for presenting (changed themes, increase font size, etc).

And this is how it handles extensions:

A profile isn't just the settings you have enabled, but also the extensions that were installed. This allows you to create different profiles for different styles of development (e.g. a React profile and a Vue profile, loading their respective extensions only).

Hope this helps

7
  • 1
    Hey, thank you, I'll checkout the extension as soon as I can and let you know if it works for me! And the issue/feature request looks good too!
    – Vl4dimyr
    Nov 14, 2019 at 12:17
  • 2
    Ok so the Profile Switcher extension is not what I want or would recommend. It uninstalls extensions rather than disabling them, and did mess with my settings. So I'll keep searching for a solution.
    – Vl4dimyr
    Nov 14, 2019 at 15:51
  • It uninstalls (but makes a backup first) those that you don’t want in your “profile”. If you want some extension to be always available, use the extensionsIgnore setting. Nov 14, 2019 at 16:48
  • I agree this may not be _ the best approach_, but it seems to work well, and is the only extension available, for now... Nov 14, 2019 at 16:53
  • Uninstalling extensions is not going to work for me, because I'm working with multiple instances of vscode in different projects that are connected, so I need all extensions to be installed! That's why I want to be able to copy the enabled/disabled extension settings and since vscode is storing them somewhere it has to be possible to copy them! Yes maybe there is no extension that does this yet, but if I would know where to find these settings and how to distinguish between the different workspaces I could work with that!
    – Vl4dimyr
    Nov 15, 2019 at 9:44
1

There is a github issue for this problem: Feature Request: Enable/disable extensions from config file #40239.

I posted there a workaround using multiple vscode instances: link

Here is a copy-paste:


I use some kind of workaround to be able to use the extensions I want.

According to the vscode-cli your can specify the folders for extensions and user-data:

Options                  Description

--extensions-dir <dir>   Set the root path for extensions.
--user-data-dir <dir>    Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of Code.

Basically, I create a specific folder for my specific tasks (one of front, one for back, ..) and set basic extensions to my default vscode.

To launch my custom config:

code --extensions-dir "$HOME/.vscode/profiles/my-super-profile/extensions" --user-data-dir "$HOME/.vscode/profiles/my-super-profile/data"

The problem are that:

  • It's not REALLY a project config file but a global preference file
  • I had to install manually the extensions. I believe there is a hackish way to do this
  • It use more size than necessary (multiple vscode data / duplicate extensions)
  • It doesn't solve in a clean way the team-sharing problem
1
  • 1
    Hey thanks for this I'll give it a try soon! But for now it sounds good to me, for installing the extensions I can create scripts and size doesn't matter, it may not be the cleanest way of doing this but it sounds like it would do what I want (for now) and really keep things separated, also when using different directories its less likely to mess up my settings!
    – Vl4dimyr
    Feb 7, 2020 at 12:05
0

VS Code Extension: Unwanted Recommendations made possible by 🎉GARAIO LABS🎉 [ref]


As of 2023-March, the extension:

  • Allows specifying extensions that are unwanted in extensions.json

    {
      "recommendations": [
        "vue.volar"
      ],
      "unwantedRecommendations": [
        "vscode.typescript-language-features",
        "octref.vetur",
        "vue.vscode-typescript-vue-plugin"
      ]
    }
    
  • On VS Code workspace open, will prompt to disable unwanted extensions in workspace (if any found not yet disabled)

  • User then MANUALLY selects extension from the filtered list and sets it to Disabled (in workspace)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.