Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart loading of extensions based on manifest #39272

Closed
JasCodes opened this issue Nov 28, 2017 · 18 comments
Closed

Smart loading of extensions based on manifest #39272

JasCodes opened this issue Nov 28, 2017 · 18 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) extensions Issues concerning extensions feature-request Request for new features or functionality

Comments

@JasCodes
Copy link

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

@vscodebot vscodebot bot added the extensions Issues concerning extensions label Nov 28, 2017
@kieferrm kieferrm added the feature-request Request for new features or functionality label Nov 28, 2017
@kieferrm kieferrm self-assigned this Nov 28, 2017
@kieferrm kieferrm added this to the Backlog milestone Nov 28, 2017
@jcrben
Copy link

jcrben commented Jan 19, 2018

This seems similar #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

@melMass
Copy link

melMass commented Sep 14, 2018

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

@jcrben
Copy link

jcrben commented Sep 14, 2018

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

@melMass
Copy link

melMass commented Sep 14, 2018

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....

@cswl
Copy link

cswl commented Jan 10, 2019

Any updates on this or any other issue related ?

@createdbyjurand
Copy link

createdbyjurand commented Mar 11, 2019

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 :)

@jlongo
Copy link

jlongo commented Jun 9, 2019

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.

@jlongo
Copy link

jlongo commented Jun 9, 2019

#40109

@liangjiancang
Copy link

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

@ldsands
Copy link

ldsands commented May 15, 2020

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],(#40239 (comment)), here, here, here, here and many more.

@Metadorius
Copy link

Any further updates on this?

@mnesarco
Copy link

Hi Friends, are there any plans to support this feature? I also work on may projects, many languages/stacks... vscode has become my ide for everything but it is a pain to wait for java language server to start when I open a c++ project! so I have to disable many things per workspace manually. It would be great to have some way to switch between user defined preconfigured vscode profiles.

@julie777
Copy link

What I would like is a variation of the above. I would like to set the extensions to be enabled for a workspace in the vscode settings for that workspace. That way I could have all the extensions that I use installed, but have all the ones that don't apply to the current workspace disabled. This would prevent some extensions from conflicting with each other.

An example is vetur and volar for vue code. I might need to use vetur for past projects, but I am using volar for all current projects.

@gjsjohnmurray
Copy link
Contributor

@julie777 as a workaround you may be interested in the technique I described at #120351 (comment)

@mesqueeb
Copy link

mesqueeb commented Nov 7, 2021

In our team we sync the .vscode/settings.json file via Github so the whole team has the same configuration for our project.

Some plugins we use clash and break VSCode, so to avoid it we need to disable (workspace) a specific plugin for our project.

Now I need to make sure everyone does that manually... If this setting can just be saved in .vscode/settings.json it would make our teamwork way more efficient!

That's my 2 cents on this : )

@hxse
Copy link

hxse commented Nov 10, 2021

I found a way in cli:

code --list-extensions
code --disable-extension <extension id> --disable-extension <extension id2> <package name>

This way you can start your project from the command line and disable unwanted extensions.
But if you disable extension in cli, you can't start it again unless you restart vscode, which is very confusing.
The enable function is expected.

@g13013
Copy link

g13013 commented Nov 25, 2021

this would be a great feature

I am proposing another feature #137091 that could benefit from this feature.

@isidorn
Copy link
Contributor

isidorn commented Dec 14, 2023

Dup of #347

@isidorn isidorn closed this as completed Dec 14, 2023
@isidorn isidorn added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 14, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) extensions Issues concerning extensions feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests