-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
Add support for disabled extensions #838
Conversation
Execute vs code list extensions command line to get all extensions even the ones that are disabled. Iterate over enabled extensions and remove it from the disabled array.
Please look into this @shanalikhan. Thank you for this extension. Also thank you for your effort @lcsrinaldi. |
Give me some time , a two weeks or three. |
Any updates on this PR status? 😃 I'd love to have this feature. |
microsoft/vscode#15466 Settings Sync use API to install/uninstall all the extensions from the v3.3.0 |
Wouldn't it be better if we have support for this using the CLI available while we wait for API to materialize? Also the vscode team hasn't assigned a proper milestone for the feature request. So it is not a priority for them right now. Does the PR need any changes to be useful enough to be merged? Would be glad to give it a try. |
@richcocoa The problem is that we can't easily find the CLI. There are so many variants of VSCode that it would be inefficient/impossible to hardcode them. That's why we're trying to use the API. |
I don't understand what's the problem of using the CLI. As you can see here https://github.com/shanalikhan/code-settings-sync/blob/v3.2.9/src/service/pluginService.ts#L302 Correct me if I'm wrong, but the code is already using the command line to install other extensions. |
@r-inaldi Yes, but coverage is spotty with the CLI method. It's a pain getting the code executable when there are versions of code, like code-server and vscodium, that have different binaries. Also, Windows, macOS, and Linux all have the executables in different places. |
@r-inaldi Actually, CLI based commands are going to remove in the upcoming version and we are replacing with vs code API because CLI commands were not working with OSS versions for code. I have asked code team, lets see what they respond, else what i think for the temporary solution will be to use CLI commands only for enabling / disabling extensions and mentioning the limitation that CLI commands wont work for code OSS versions. I am keeping this PR open. |
@r-inaldi We can use CLI based commands for disabling and enabling the extensions. We can release this PR in This feature will be Can you fix this PR and let me know when its ready to merge. |
Let me know when you fix it, I will merge the PR. |
Hey there, not sure what you want me to fix in this PR. Merge conflicts? Also, any reason to close the pull request? Should I open a new one? |
We are now using API to perform functions that were previously using VSCode Command lines interface. (e.g installing extensions). Because we were unable to identify the Enable / Disable Extension doesn't have API ( that i have asked on microsoft/vscode#15466) hence you need to introduce the command line in extension back again to perform enable / Disable extensions only. Let me know if you have any confusion. You will find the code related to running command lines in releases prior to v3.3 |
Oh cool, thanks for explaining! I'll make this changes when I have some time. Do you also want me to add an option to enable this in the extension settings? |
Yes. |
Short description of what this resolves:
Takes account disabled extensions when uploading or downloading the gist file.
Changes proposed in this pull request:
CreateExtensionList
now usescode --list-extensions
to get enabled and disabled extensions;download
executes it verifies the extension object's enabled property . If false callscode --disable-extension
with the extension name.Fixes: #143
How Has This Been Tested?
Tested on a Macbook with VSCode.
code-settings-sync
project;F5
) inside this branch executeUpload / Update settings
;Download settings
;Checklist: