You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to enable / disable extension from API or commands #15466
is there any way to disable some specific extension through API ?
installExtension and uninstallExtension commands were recently added in vscode.
Reacted by John Meyer, Michael Ovchinnikov, Nonoroazoro, YFdyh000, Damian, Michael Astrauckas, Philipp, MrLuje, Alesso, Shivanshu Kant Prasad and 60 more
When syncing extensions you need to know every extension that's installed (regardless of disabled or not) then you need to also somehow get information on which extension is disabled for which workspace.
That way you can also sync the workspace settings, essentially providing a backup, it might even be possible to share the workspace settings across installs, e.g. if two copies of a workspace are on exactly the same path on both computers.
Just my initial thoughts on how I'd expect the sync to work.
Reacted by Sandeep Somavarapu, Shan Khan, Jonas Bushart, cyberhazard, Thu San and Gabriel Maia Gondim
I agree with Martin Gill (@MartinSGill) with the approach. While syncing you should be able to have the information about installed, enabled, disabled extensions. This would lead to the issue of how we store some state/settings which we are doing in Local storage. It would be helpful if we are able to share this too.
Does anyone have any updates on how we can achieve this? I have sooo many extensions installed because I work on multiple types of projects. I can always disable them for a certain workspace, but every time I pull down a new project I have to go through the tedious process of disabling multiple extensions. For example I have plenty of angular extensions and plenty of vue.js extensions, I have typescript extensions, redux extensions, extensions for c#, python, powershell, prettier/beautify, snippets, and on and on it goes.
We need a better way to manage this. If there was a way to put an extensions manifest file of some kind in the .vscode folder, then this would solve all of my problems. The next time I load up a project/workspace, then the file could enable and/or disable the extensions. This would be good because I work on a team with multiple people. The next time someone adds or removes an extension then we will all get that update. It helps with code/workspace uniformity. Also onboarding would be simplified too. I know a recommended extensions thing exists, but that honestly doesn't help at all when really we need it to automatically install/uninstall/enable/disable extensions.
Reacted by Jesse McCarthy, Adzo, 风痕, rbadapanda, Jeff Lewis, Manas Talukdar, Amine D., Jeff Lewis, githubuuuuu, Gabriel Maia Gondim and 7 more
Also it would be great to have the API to list disabled extensions, because right now vscode.extensions.all returns only enabled and built-in extensions.
I made an extension to create and switch between extension presets in different workspaces. The only last thing I need is to be able to actually enable/disable extensions through the API and the ability to list disabled/enabled extensions.
Reacted by João Matos, Thorbjørn Horgen, heartacker, Teo Gonzalez, BC, Joel Watson, mikoloism, Reyn and nev-21
We closed this issue because we don't plan to address it in the foreseeable future. You can find more detailed information about our decision-making process here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
Also it would be great to have the API to list disabled extensions, because right now vscode.extensions.all returns only enabled and built-in extensions.
I made an extension to create and switch between extension presets in different workspaces. The only last thing I need is to be able to actually enable/disable extensions through the API and the ability to list disabled/enabled extensions.
I also ran into this problem, you can see how I implemented it in my repository.
Initially selected disabled extensions:
The list of globally disabled extensions I found in ${process.env.HOME}/Library/Application Support/Code/User/globalStorage/state.vscdb field extensionsIdentifiers/disabled But here it shows extensions that are disabled globally.
Evald Smalyakov (@evald24) Updating User/globalStorage/state.vscdb isn't working (the db is updated but the extensions...). Maybe it's working for workspace which your code seems to only do, but I've not tested that.
Activity
ramya-rao-a commentedon Nov 15, 2016
what is your scenario?
shanalikhan commentedon Nov 15, 2016
Settings Sync needs this. If one extension is installed in one code, it installs on second code instance on work PC.
But when user disables the extension and make a backup and when it downloads the extension it enables that extension, i need to disable it from API
Ref : shanalikhan/code-settings-sync#143
MartinSGill commentedon Nov 16, 2016
Isn't it a bit more involved than that?
When syncing extensions you need to know every extension that's installed (regardless of disabled or not) then you need to also somehow get information on which extension is disabled for which workspace.
That way you can also sync the workspace settings, essentially providing a backup, it might even be possible to share the workspace settings across installs, e.g. if two copies of a workspace are on exactly the same path on both computers.
Just my initial thoughts on how I'd expect the sync to work.
sandy081 commentedon Nov 16, 2016
I agree with Martin Gill (@MartinSGill) with the approach. While syncing you should be able to have the information about installed, enabled, disabled extensions. This would lead to the issue of how we store some state/settings which we are doing in Local storage. It would be helpful if we are able to share this too.
[-]How to disable extension from API[/-][+]How to enable / disable extension from API[/+]richarddavenport commentedon Sep 25, 2017
Does anyone have any updates on how we can achieve this? I have sooo many extensions installed because I work on multiple types of projects. I can always disable them for a certain workspace, but every time I pull down a new project I have to go through the tedious process of disabling multiple extensions. For example I have plenty of angular extensions and plenty of vue.js extensions, I have typescript extensions, redux extensions, extensions for c#, python, powershell, prettier/beautify, snippets, and on and on it goes.
We need a better way to manage this. If there was a way to put an extensions manifest file of some kind in the .vscode folder, then this would solve all of my problems. The next time I load up a project/workspace, then the file could enable and/or disable the extensions. This would be good because I work on a team with multiple people. The next time someone adds or removes an extension then we will all get that update. It helps with code/workspace uniformity. Also onboarding would be simplified too. I know a
recommendedextensions thing exists, but that honestly doesn't help at all when really we need it to automatically install/uninstall/enable/disable extensions.9 remaining items
shanalikhan commentedon Jul 2, 2019
sure, looking forward.
[-]How to enable / disable extension from API[/-][+]How to enable / disable extension from API or commands[/+]bmewburn commentedon Jul 4, 2019
I'd like to see this. My use case is to disable the built-in PHP Language Features when using https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client
alexeychikk commentedon May 17, 2020
Also it would be great to have the API to list disabled extensions, because right now
vscode.extensions.allreturns only enabled and built-in extensions.I made an extension to create and switch between extension presets in different workspaces. The only last thing I need is to be able to actually enable/disable extensions through the API and the ability to list disabled/enabled extensions.
vscode-triage-bot commentedon Nov 9, 2020
We closed this issue because we don't plan to address it in the foreseeable future. You can find more detailed information about our decision-making process here. 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!
evald24 commentedon Jun 19, 2021
I wrote a plugin that allows you to quickly apply the necessary extensions to the project on pre-prepared profiles.
The essence is very simple, you create a profile, select extensions and apply the profile.
Even after restarting VSCode, extensions remain assigned to projects.
The extension is already available on the marketplace
Who is interested here is the repository
PS: This is my first extension 🚀, if someone likes it, thank me with a star in the repository or rate me on the marketplace 😊
evald24 commentedon Jun 19, 2021
I also ran into this problem, you can see how I implemented it in my repository.
Initially selected disabled extensions:
The list of globally disabled extensions I found in
${process.env.HOME}/Library/Application Support/Code/User/globalStorage/state.vscdbfieldextensionsIdentifiers/disabledBut here it shows extensions that are disabled globally.Initially selected the enabled extensions:
But it was inconvenient and wrong, and I started scanning the extensions folder, excluding the unnecessary folders listed in
.obsoletedaiyam commentedon Jul 29, 2021
Evald Smalyakov (@evald24) Updating
User/globalStorage/state.vscdbisn't working (the db is updated but the extensions...). Maybe it's working for workspace which your code seems to only do, but I've not tested that.daiyam commentedon Aug 24, 2021
Evald Smalyakov (@evald24) My bad. Your code is working. I just need to restart VSCode so it can reload the updated
state.vscdb.kosude commentedon May 4, 2024
Any updates on this feature?