-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Support workspace extensions #347
Comments
Good suggestions, we had discussions along these lines and this falls into the category of how to deal with many extensions and how to work with extensions in a team. This topic is on our 6 month roadmap. |
Thanks @joaomoreno for report duplication I would like to suggest that VSCode should just look at .vscode/extensions folder of the opened folder to read extension in addition to global .vscode/extensions |
Over one year later, can we have some light on the current status of this issue? |
As noted over at https://web.archive.org/web/20170211004013/https://code.visualstudio.com/updates/v1_6#_workspace-extension-recommendations you can now create I want to be able to load and unload these on-demand based upon which project I'm in, however - #39272 is along those lines |
I wanna force my team to use some linters, such like I would like to force the usage of Do I think forcing some extension is bad? |
@odahcam use tools like husky and git hooks to prevent the invalid commits. |
That would be a nice feature to have. The Code editor will be more responsive, because will load from .vscode the extensions which we are needed for the workspace/project. Have in mind, that peoples uses VSCode for everything, so installing like 30 extensions to have PHP, TS, JS, etc, have performance impact. |
@cgatian I do use husky but the errors dont show in the IDE so we need to run it thru the terminal to see the actual error. Any ideas how I can improve this? |
This feature can be big thing. After this, VS can be so good as Eclipse or VIM! I hope this will be soon 😿 Just imagine multiple workspace per project... or per active extension like "Git" workspace or "Diff" workspace... not only editor change... but whole workspace can supoprt your actual work! |
Much better would be something like |
@TheAifam5 there is some experiment https://github.com/aaronpowell/vscode-profile-switcher ... but it's not so complex. |
@scippio nah. it changes only configuration.... does not isolate environments. |
@scippio Thank you! This extension allows you to create different profiles, each with its own settings and EXTENSIONS. So when switching to a Web Php project I can enable the "Web Php" profile, when doing college activities in C, I switch to the "C" profile. @TheAifam5 I suggest you read README.md, specifically the topic EXTENSIONS, I left the link below: |
@gnixlch not at all suspicious 😂 |
@nioufe I know this issue is really old and I think https://code.visualstudio.com/docs/editor/extension-marketplace#_workspace-recommended-extensions satisfies your needs now. Is this good to close? |
I think it helps, but doesn't solve the issue which aims to have extension configuration per workspace. It's very painfull to have to enable/disable a bunch of extensions everytime you change or open a new workspace. |
@lramos15 actually recommended extensions don't really solve the problem. The idea is to 1) require, and 2) automatically disable extensions based on which workspace are you in. If you use VSCode for multiple environments this gets really messy with all the extensions. |
This is a very big issue. I switch between python projects and javascript projects. I don't need or want javascript extensions enabled when working in python. Today it caused a problem that took me a while to track down. All it takes is adding to workspace settings
Even better would be to also allow me to configure sets of extensions for different project types in my user settings. |
Our vision for this is to be handled as part of Profiles #116740 Have you had a chance to try out profiles? If yes, is there something missing from this feature? |
For my use case, Profiles looks like it could work for this as long as you can define a profile within workspace settings. Not every project has the same requirements, e.g. I might have a prisma extension which is only required for one project, and I don't want to have many "single use" profiles that I have to manually switch to. |
Agree. This proposal has difference usage than profile and actually more useful. Many times we only have one project that require specific extension and we should be able to share that within repository |
This may solve unneeded extensions being loaded, but this won't solve the use case of requiring specific extensions for comfortably working with some project. Suggested extensions are too subtle to actually be useful. |
In case you weren't aware @Metadorius, the choice to not allow required extensions is a conscious decision for security reasons surrounding automatic installation and activation of plugins. It is unlikely that they will add this functionality for this ticket. It would be good to have an option to activate extensions if they're installed, disable all other installed extensions, and a section that shows extensions that need installing, perhaps with a warning about installing unknown extensions. Having an Allowlist method makes more sense than a disallowlist when the profile is part of the workspace settings, because you don't know what extensions a user may have. |
@mikeybinns and yet we still have stuff like automatically running tasks and workspace trust, so I don't think that is a valid reason for disregarding the need of a feature. Maybe have a dialog to setup workspace where the developer could see all the extensions that are going to be installed and other operations to be done and could agree to all (or don't) |
More so, we already have dialogs like this to setup individual extensions or VSCode itself (Python, for example), so those could be reused or built upon for the workspace, so when you open the workspace first time you've given a list of stuff that needs to be setup in order to comfortably work in the workspace. |
I highly suggest to use https://code.visualstudio.com/docs/editor/profiles for this. |
While workspaces are great for personal setups, they don't provide a way to ship a required set of extensions with a project (e.g. a config file in the repo). |
True. Though that is captured by #181123 the ability to assign a profile to a workspace. But we can reopen this issue for this issue case. |
I'm not sure it would be captured by that. Imagine the following use case, a new developer joins the project, they haven't set up VSCode or anything. I would like a way for them to open a project, automatically create and apply a profile configured in the code itself (similar to how workspace settings work, but with extensions) without needing to download a shared profile from an external source. In code configuration could also handle updates to a profile too instead of requiring everyone has to check their work-configured profiles are up to date each month. |
I have a feeling this can be closed following recent development of per-workspace local extensions. |
I can't find any documentation on what you've mentioned @AnrDaemon, can you link a PR or a doc page? |
@mikeybinns I think what @AnrDaemon referering to is this: Local workspace extensions It does solve the locality issue of per-workspace extension, but depends on how the original feature request is envisioned, It may or may not fully capture the requirement... One problem I have with the current Local workspace extensions feature is that, CMIIW: Instead of using (installing) the extension directly from the extension marketplace, the Local workspace extensions feature requires you to copy and distribute all the extensions — that you want to be local in your workspace — with the workspace itself. FWIW, I think this issue is related — if not duplicate — to the newer yet more popular issue: #40239 |
I think so too that the |
I hate to be a stick in the mud here, but local workspace extensions seems like a lot of effort to maintain, especially if there's lots of extensions you want to include. I also don't think it would do anything about other extensions a user may have installed. What I would like to see is a defined list of extension IDs, and when this is present, only those extensions are loaded, and other extensions must be explicitly enabled via workspace settings (similar to how "disable for workspace" works), and if those extensions aren't present, they appear as workspace recommendations, and can be installed from the marketplace. |
Since you can't make "workspace suggested configuration" (and it was explicitly stated that such feature is out of scope. Yes, I asked…), what you are suggesting is also not possible. |
@AnrDaemon That's a bummer 😔 Okay, I don't think this will go further towards what I was looking for then :/ |
@mikeybinns, I think, this kind of setup would largely cover your request. It effectively uses extension installation paths as such extension IDs. You would indeed need to maintain all installed extensions across all workspaces in an (ideally, separate common) repository, but this would anyway be necessary to ensure that the set of recommended extensions would work out of the box without explicit installation for any given workspace. Unfortunately, it still doesn't work out of the box specifically due to the handling as "workspace suggested configuration" (aka recommendations) rather than workspace's actual configuration. |
It would be interesting for people working on different projects to have a way to :
1: Set up extensions for the all team to have an uniform configuration
2: Have different extensions on different projects
I think that having a list of extensions in the Workspace configuration could solve this.
Otherwise i'll just have to write an extension for it :-)
The text was updated successfully, but these errors were encountered: