-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Persisting "disable by workspace" settings in source control #18386
Comments
I do not think this is currently possible. We allow workspaces to recommend extensions using @joaomoreno or @sandy081 Any thoughts? |
Yup, not possible today. But I definitely see the need. |
I'd also like this. For disable by default, see #15611 |
This is also crucial for projects which use tslint not prettier. Most of my JS work is done using prettier but when I open a new javascript project which does not use prettier the extension loads by default and starts formatting everything. Disabling
|
@sandy081 Yes but this should be configurable by some file which I can commit into my repository. Otherwise every dev on my team would have to do the above procedure for each of our projects. |
@esetnik I think it is hard to know the extensions installed by others. There could be many other extensions each user could have installed. It should be the user choice to disable an extension if it does not work. I also think it is not a general scenario and you can fix it either by communicating to the team or have a custom extension that looks for the extensions you do not want and notify the team. |
@sandy081 I believe the extension recommendation system should be used for this purpose. When the user first opens vscode which includes extension requirements they don't have it should inform the user to install those extensions and then reload. My goal is to get to a 100% working vscode setup for any particular project from git clone as quickly as possible. Having mixed extension configuration / installation / loading across team is bad for consistency. |
@esetnik I agree that extension recommendation should be used to set up a project quickly in VS Code and is doing exactly what you mentioned. But, I do not agree to have a black list of extensions to uninstall/disable which will remove the extension from user window. IMO this is not a good experience. As said, the list is open ended and it cannot be complete.
Looks like you want to restrict the extensions your team want to use for a project like a strict mode? |
An example is for projects that use prettier. If a user has the prettier extension installed, then everything is fine - we can use the extension recommendation system to help people discover the prettier extension. However if the user has already got an extension like beautify, then it causes undefined behaviour in vscode because both extensions implement format on save functionality. I've run into this problem before - I've setup a project level vscode config which turned on If we had a way to disable user's extensions, then the whole thing could have been avoided. There are many cases where as a project author/maintainer, I don't want people to use certain extensions. Right now I can only put them in the readme and hope that contributors read it and disable them (hint - they almost never do). Most people already have their VSCode setup how they like it when they open up a new repository to contribute, so they do not look at the extensions screen. So providing recommendations to have users manually enable/disable extensions is kind of useless in that regard. Another use case for a feature like this would be to let me disable and enable extensions across computers. Like @esetnik said, I want to be able to get from clone to working as quick as possible. If I've got my vscode setup with many extensions installed, I might want to turn some extensions on/off depending on the type of code in the project. For example if I open a C# project, I want a suite of C# extensions turned on, but I don't want my suite of JavaScript extensions turned on, and vice versa. If you're really worried about it being abused or people not liking it, you can always add a user setting to vscode which ignores it, so that if someone gets annoyed by a project disabling their extension, they can toggle the setting to ignore workspace configs. Personally, I don't see how this sort of extension config is any worse than project vscode config. I reckon that I can do a lot more to create a bad user experience for a user by putting random settings in the project vscode config than I can by simply disabling extensions. |
Hiya! So, working with VSC with Dynamics 365 Business Central, we have to install from VSIX the appropriate version of the Extension do our development work with BC for on-premise customers. Microsoft currently releases a new version of BC and the VSIX every month. This means that we have to constantly switch out and in a VSIX file for development to match the project. It would be a HUGE help to be able to tie what extensions are enabled/disabled per workspace from the settings.json file, as we could simply install ALL the relevant VSIX versions we are needing, then let the settings.json file that is in our SCM repo for that project drive which version of the Extension we're using. The existing recommendation and Enabled/Disable per workspace is great, but we very, very much need this functionality in the per-workspace settings.json in our industry use. |
@bradzacher Nicely summarised. I like the idea of having workspace specific extension profiles. If a workspace has a profile, opening that in VS Code should run with that list excluding some already installed user extensions. How somebody can define that some extensions as it varies from user to user? It lacks some kind of generalisation. What I do not like is listing extension by extension in that list. May be instead of listing one by one why not the list can be those extensions listed in workspace + installed UI extensions. On a related note to those who are complaining about multiple formatters, I think it is a different issue and is being tracked here - #41882. I do not want this issue drives this feature. If everybody agrees that they need workspace extension profiles, I would update the issue accordingly. |
@sandy081 Another alternative could be a change to extensions themselves, allowing extensions to list other extensions they conflict with. Then based on the workspace's recommended extensions list it turns on all of those, and turns off all extensions that may conflict. |
My thinking that the feature would at least let us expressly blacklist extensions. A whitelist could work, but that would imply that a user's extensions are disabled by default and are selectively turned on when you open a project, which seems kind of backwards? Essentially I want to be able to force disable certain extensions in my project because:
Maybe it would also be good to provide a better way to notify users of recommended extensions for this workspace, because the current one relies on users specifically going into the extensions tab and opening the recommended section (which, like I said, from my experience almost never happens). |
Request renewed #91885 |
@sandy081 what is taking so long to implement the functionality to disable extensions from a workspace config file? |
Definitely because of other high priority stuff. |
@TriMoon you could always submit a PR |
Hi @sandy081 any update on this? This seems to be troubling a lot of people (lot of duplicate issues, lots of comments). It also seems, that there is some resistance from vscode developers side - lots of counter-comments disagreeing with the need of code based definition of enabled/disabled extensions, whilst it seems to be the only correct way to treat extensions in the same manner as all '<fill_word> as a Code' best practises. It is actually a lot unintuitive, that I can not define enabled/disabled extensions in .code-workspace settings. So, let me ask, just for clarification of vscode-developers point of view: Thank you for clarification and all the great work on vscode so far. |
Sorry 😐 , no updates unfortunately. |
IMHO bad extensions (like the suggestion of the Angular one slowing down React projects) should be fixed rather than disabled by the workspace. The linter and formatter issues should be fixed with settings. i.e. A workspace setting declaring what formatter/linter to use or whether it should be enabled. I am in favor of a way to add workspace settings recommendations to source control. That solves other issues beyond just disabling a few troublesome extensions:
|
I want to disable some extensions in some of my team workspace because those extensions have performance problem(or other issues). I hope that I can add the disable setting to vscode-workspace file to disable for those team mates. just like I can recommend extensions. and teammates should show a message that settings want to disable those extension? YES/NO. Just like recommend |
Hi, I have an idea that is easy to implement for you, I think. I also faced the issue to enable recommended extensions for my Workspace. I work on different technologies according to which I have to switch to different environment. For that I need to disable and enable some extensions. The idea is simple.
I think it's simple to implement. Thank You |
Hi @sandy081 any update on this? |
Our company works in an enclosed environment so we provide vscode with several pre-installed extensions to our users. In the case of python we have pylint, flake8 and ruff as possible linters. So far one could just toggle the extensions "python.linting.pylintEnabled": true entry in .vscode/settings.json. With the python extension about to drop linters/formatters and move them to separate extensions this option will no longer be available. Having the enabled/disabled state in a file would really help! |
Looking at the age of this issue, with no fix yet, (Jan '17 that's 6½ years back now)
I think it is best to advise that people use a different IDE/Editor instead of this M$ one. |
We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding, and happy coding! |
And... All it took was 7 years to conclude that this feature is out-of-scope... 😮💨 |
This is a pity. The rise of AI assistant extensions highlights another reason to have this feature. Our company is a consultancy/agency that uses VSCode almost exclusively. We're rolling out the use of Copilot and hence our devs will all have the extension installed and enabled by default. The problem occurs because some clients have explicitly disallowed the use of AI assistants. Without the ability to blacklist the Copilot extension in the workspace, we run the risk of developers forgetting to disable it, and having to remember to disable/enable it when they switch between projects. I don't agree with the argument that extension blacklisting should not be implemented because "the list is open ended and it cannot be complete". Yes, we cannot guarantee our developers won't be using other disallowed extensions, but we can disable the ones we know we do commonly use. A useful feature shouldn't be ignored just because it isn't perfect. |
Can this setting be saved in the workspace setting.json so I don't need to ask every developer to disable the extension (if installed)?
In my company, our main product is stored in perforce so I use the perforce extension.
However, there are many small projects stored in git (bitbucket).
Optimally, I would like to "enable by workspace" and "disable by default", but if that is not available, then storing the setting would be the second best option.
Or maybe I should just suggest that feature instead? 🌷
The text was updated successfully, but these errors were encountered: