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

Support workspace extensions #347

Open
nioufe opened this issue Nov 20, 2015 · 38 comments
Open

Support workspace extensions #347

nioufe opened this issue Nov 20, 2015 · 38 comments
Assignees
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality plan-item VS Code - planned item for upcoming
Milestone

Comments

@nioufe
Copy link

nioufe commented Nov 20, 2015

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

@egamma egamma added the feature-request Request for new features or functionality label Nov 20, 2015
@egamma
Copy link
Member

egamma commented Nov 20, 2015

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.

@egamma egamma assigned egamma and unassigned egamma Nov 20, 2015
@joaomoreno joaomoreno changed the title Extensions in workspace settings Support workspace extensions Nov 26, 2015
@Thaina
Copy link

Thaina commented Nov 26, 2015

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

@Telokis
Copy link

Telokis commented Apr 18, 2017

Over one year later, can we have some light on the current status of this issue?

@bpasero bpasero added the extensions Issues concerning extensions label Nov 11, 2017
@jcrben
Copy link

jcrben commented Jan 19, 2018

As noted over at https://web.archive.org/web/20170211004013/https://code.visualstudio.com/updates/v1_6#_workspace-extension-recommendations you can now create .vscode/extensions.json... (learned about this thru #5559 (comment))

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

@odahcam
Copy link

odahcam commented Apr 10, 2018

I wanna force my team to use some linters, such like ikappas.phpcs because it can check if the code quality is enough before they make a PR. The merge won't happen anyway if PHPCS isn't satisfyied.

I would like to force the usage of EditorConfig.EditorConfig.

Do I think forcing some extension is bad?
It can be, but if they don't like working following the rules, they are free to suggest some change in the rules or work somewhere else.

@cgatian
Copy link

cgatian commented Apr 11, 2018

@odahcam use tools like husky and git hooks to prevent the invalid commits.

@TheAifam5
Copy link

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.
With this method we can load extensions which we actually need.

@mackelito
Copy link

@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?

@scippio
Copy link

scippio commented Jun 18, 2019

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!

@TheAifam5
Copy link

Much better would be something like profile manager. When you start VSCode, you have the ability to select your environment and set it as default if you dont want select it every launch, also switching between them, creating new one and deleting other ones.

@scippio
Copy link

scippio commented Jun 25, 2019

@TheAifam5 there is some experiment https://github.com/aaronpowell/vscode-profile-switcher ... but it's not so complex.

@TheAifam5
Copy link

TheAifam5 commented Jun 25, 2019

@scippio nah. it changes only configuration.... does not isolate environments.

@albertoelias123
Copy link

@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:
https://github.com/aaronpowell/vscode-profile-switcher#extensions

@gnixlch
Copy link

gnixlch commented Apr 1, 2021

runthis.zip

@mackelito
Copy link

@gnixlch not at all suspicious 😂

@lramos15
Copy link
Member

lramos15 commented Jul 1, 2021

@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?

@odahcam
Copy link

odahcam commented Jul 1, 2021

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.

@Metadorius
Copy link

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

@julie777
Copy link

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

  • extensions to enable or
  • extensions to disable
    I think enable is preferable so that if I work on another project and install an extension for that project, I don't want to switch projects/workspaces and the new extension automatically become active.

Even better would be to also allow me to configure sets of extensions for different project types in my user settings.
That way I could enable an entire group at the same time.

@isidorn
Copy link
Contributor

isidorn commented Dec 6, 2022

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?
Otherwise I will go ahead and merge this issue into the Profiles one. Thanks!

@isidorn isidorn self-assigned this Dec 6, 2022
@mikeybinns
Copy link

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.
I would also want to share the profile between different users so all members of a Dev team on a specific project have the same extensions installed and active.

@Thaina
Copy link

Thaina commented Dec 9, 2022

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

@Metadorius
Copy link

Metadorius commented Dec 9, 2022

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? Otherwise I will go ahead and merge this issue into the Profiles one. Thanks!

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.

@mikeybinns
Copy link

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.

@Metadorius
Copy link

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

@Metadorius
Copy link

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.

@isidorn
Copy link
Contributor

isidorn commented Jun 26, 2023

I highly suggest to use https://code.visualstudio.com/docs/editor/profiles for this.
I will go ahead and close this issue. If there are still some features that are not covered by profiles please let me know and we can reopen this issue or open new ones. Thank you!

@isidorn isidorn closed this as completed Jun 26, 2023
@mikeybinns
Copy link

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

@isidorn
Copy link
Contributor

isidorn commented Jun 26, 2023

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.

@isidorn isidorn reopened this Jun 26, 2023
@mikeybinns
Copy link

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.

@sandy081 sandy081 added the plan-item VS Code - planned item for upcoming label Mar 4, 2024
@AnrDaemon
Copy link

I have a feeling this can be closed following recent development of per-workspace local extensions.

@mikeybinns
Copy link

I can't find any documentation on what you've mentioned @AnrDaemon, can you link a PR or a doc page?

@IronGeek
Copy link

IronGeek commented Jun 2, 2024

@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

@Thaina
Copy link

Thaina commented Jun 2, 2024

I think so too that the Local workspace extensions is satisfied this issue

@mikeybinns
Copy link

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.

@AnrDaemon
Copy link

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.

@mikeybinns
Copy link

@AnrDaemon That's a bummer 😔

Okay, I don't think this will go further towards what I was looking for then :/

@l-inc
Copy link

l-inc commented Jul 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality plan-item VS Code - planned item for upcoming
Projects
None yet
Development

No branches or pull requests