Vscode: Smart loading of extensions based on manifest

Created on 28 Nov 2017  路  10Comments  路  Source: microsoft/vscode

Extensions part of vscode requires overhaul; and extension.json manifest files might be great way to fix this.

It would be great if it were possible to add manifest of extensions in project settings. So when project or workspace is open; vscode loads only extensions mentioned in either project level or workspace level or user level.

If the extension is not yet present; vscode could pulls it from internet but only load the one required as per extension.json manifest.

This will improve the performance of vscode as user if choose can put majority of extensions need for project in project setting i.e it goes into git repo itself. This will also create consistent dev experince as they are no required to manually install recommend extensions.

This approach automatically fixes setting sync issue; as all of things about vscode is manifest in files which can in turn life in github.

Thx

extensions feature-request

Most helpful comment

I work on 5 computers in 3 locations.
I had to manually enable and disable extensions for 32 projects workspaces on each computer because there is no way I can set this in .vscode settings :(

I am a front-end developer so some projects are in React, some in Angular, some in Vue, some in Node, sometimes it none of the above, and sometimes it is just pure JavaScript. Each project needs different extensions and has conflicts with others.

And the problem is: on all computers I work on all projects. And when I get new laptop, I have to set up everything again :(

This sucks.

I know there is already working extensions.json file in .vscode folder that supplies "Recommended" extensions list.

Please extend its use.

I know that forcing installation of extensions is dangerous and it is a bad idea, BUT,
if user has the extension and .vscode/extensions.json has it on enabled list - enable it
if user does not have the extension and .vscode/extensions.json has it on enabled list - recommend it
if user has the extension and .vscode/extension.json has it on disabled list - disable it

and add by default option in vscode not to follow the extensions.json, BUT,
make it as an option so some of us could turn it on in user settings.json and/or workspace settings.json :)

All 10 comments

This seems similar https://github.com/Microsoft/vscode/issues/40109:

it would be nice to have something like an editor profile per project, so that only relevant extensions would be loaded for that project. Ideally, extensions could be installed automatically if I would checkout an existing project that contains a profile and requires extensions that I don't have, yet

@jcrben Why is #40109 closed ? It seems crucial to me working with different languages, frameworks, and so extensions.

I'm just a user, but it seems pretty much the same as this, right? Extension loading scoped to a specific project

It is. Sorry, I thought you where from VS team.
I'm trying the: disable all, enable per workspace approach (manually) now but it's a pain....

Any updates on this or any other issue related ?

I work on 5 computers in 3 locations.
I had to manually enable and disable extensions for 32 projects workspaces on each computer because there is no way I can set this in .vscode settings :(

I am a front-end developer so some projects are in React, some in Angular, some in Vue, some in Node, sometimes it none of the above, and sometimes it is just pure JavaScript. Each project needs different extensions and has conflicts with others.

And the problem is: on all computers I work on all projects. And when I get new laptop, I have to set up everything again :(

This sucks.

I know there is already working extensions.json file in .vscode folder that supplies "Recommended" extensions list.

Please extend its use.

I know that forcing installation of extensions is dangerous and it is a bad idea, BUT,
if user has the extension and .vscode/extensions.json has it on enabled list - enable it
if user does not have the extension and .vscode/extensions.json has it on enabled list - recommend it
if user has the extension and .vscode/extension.json has it on disabled list - disable it

and add by default option in vscode not to follow the extensions.json, BUT,
make it as an option so some of us could turn it on in user settings.json and/or workspace settings.json :)

Seems to me the obvious necessity of something like profiles for extensions.
VSCode is used to develop many languages from same developper. PHP, Node, React, React.Native, C#, java, and many others. For each diferent language in use in one project we need different extensions and with all installed many times arrises some incompatibility or unexpected beavior between them and also computer resources wasted. Disabling/Enabling them at workspace level it's a tedious work each time we start a new project. Using a portable folder for each "profile" we need it's insane. We can also make symlinks to data directory with some OS scripting to avoid waste of space on portable instalation files, but we have it with user data folders and extensions folders.
Something like
"Profile A" -> ext1, ext2, ext3.... and so on enabled
"Profile B" -> ext1b, ext2b, ext3b.... and so on enabled
"Profile N" -> ....
And all out of list disabled...
And the definition of the profile in use is associated with workspace settings
Algo give the user the possibility to fine tune the workspace to some special needs based on profile in use.

Just my opinion, thanks for the great work made with this editor.

Sorry if i made some english language mistakes, but is not my natural language.

40109

And there should be a "no workspace profile". It's so annoying to load all extensions when opening a *.txt file.

Note: crosposted here

Could we not also base this upon the language as well. For example, if you open a folder and there are .csproj and fs files then all the c#/.net extensions load and then also the f# extensions as well?

A lot of the options that have been discussed in similar issues I think would be a lot easier to deal with if they took into account the languages in the folder that is being worked on.

Some example options that I have thought of could look something like one or more options below:

{
    // language settings option
    "[python]": {
        "editor.defaultFormatter": "ms-python.python",
        "editor.rulers": [
            88
        ],
        "extensions.activation": [
            "magicstack.magicpython"
            "ms-python.python"
            "njpwerner.autodocstring"
            "frhtylcn.pythonsnippets"
        ]
    },
    // global whitelist option
    "extension.global.activation": [
        "akamud.vscode-theme-onelight",
        "salbert.copy-text"
    ],
    // global blacklist option
    "extension.global.deactivation": [
        "akamud.vscode-theme-onelight",
        "salbert.copy-text"
    ],
    // per extension whitelist option
    "extension.global.activation": {
        "akamud.vscode-theme-onelight": [
            "python",
            "markdown"
        ],
    }
}

I also like the idea of using user defined extension groups that can be used instead of the more verbose way that I show above as mentioned in this post.

Others have suggest similar solutions or discussed this in comments [here],(https://github.com/microsoft/vscode/issues/40239#issuecomment-521186857), here, here, here, here and many more.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukehoban picture lukehoban  路  3Comments

DovydasNavickas picture DovydasNavickas  路  3Comments

sijad picture sijad  路  3Comments

shanalikhan picture shanalikhan  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments