-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
customize the extensions gallery #674
Conversation
Extend product.ts to accept environment variables for custom extensions gallery URLs
- locate & load user-customized product.json
That's nearly perfect. As previously pointed out in #537: please use The only other missing piece for making the PR perfect is the adjustment of |
- update doc
That's very good to go. @stripedpajamas can you please link #519 and then merge this? |
Could you please also add the Something like the GetModuleFileName? For me, this would be great because I use SCOOP and would then just |
@AntonOks Wouldn't it work to persist the default product.json? Or use the general more portable version to create a wrapper for the vscode binary (possibly you need one in any case, I don't know) and there check for a vscode.env or similar file, if it exists take every line and |
Well, yes, in my use case and as SCOOP is very flexible, everything is possible ;) Maybe I misunderstood your comment Anyhow, maybe I'm just on the wrong path here && anyhow, your pull will help a LOT. Thanks for doing this! |
No, that's not how it works, this would need much more things to change and a patch like this wouldn't be reasonable for vscodium. Personally I would recommend against a personal product.json, the only reason to have it in is because so many people requested it and actually it is not a big thing to patch. |
Sure, I could. But as soon as a future VSCodium release introduce new config options, or change other important settings beside the "gallery", we would be lost in space :| That's why I thought having a |
I understand that. Feel free to open an issue in the main vscode repo and/or provide a PR request there (but I personally don't think it will be ever done, the environment variables seem possible though). |
Sorry @GitMensch but it's exactly what it does. The merge between both |
@AntonOks Can the installer just copy the file into user's config directory? |
@daiyam Thanks for pointing that out, just rechecked the code and yes, that's what it does. |
Sure, SCOOP can do whatever PowerShell can... and much more, but that's not my point. It's about having more flexibility at all. So i.e. one could have some VSCodium installations in parallel with the same user and the same system or container, still with different settings, say CI/CD, debugging, testing, ....
Half-way-true.
Disagree here, see above. |
It was in the context of the For the portable mode, options are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing
Thank you @daiyam for finishing up this idea/implementation. I think a lot of people will be happy with this 😄 |
@daiyam How do you feel about doing a PR for the partial product.json in the vscode repo? If that is accepted then MS would document more for us and we can reduce the amount of patching. |
@GitMensch I didn't have much success with PR on vscode repo (1 for folding, still open after 3 years; 1 for alphabetically ordering the tabs, closed for being "out-of-scope"). So I don't think I'm going to have much chance to have that PR to be merged. But feel free to try ;) |
@daiyam: how can I "unset" something via the user json?
entry from the installed product.json after install.
to remove a setting during read-in and preventing it to get merged from the main one (or set it that way and pre-process the list to remove the entries with "None")? |
Have you tried |
That was my first approach but using that "Check for new version" is still available; if I remove the line from the installed product.json then that menu entry is not shown any more. Maybe I did something wrong? Does it work on your side? Note: the entry in the docs is wrong, for Win32 the default path is |
No, I haven't tried. |
@GitMensch When doing the patch for 1.55, I found that |
Hm, I may was too fast on Note: vscode applied some changes shortly before the 1.55 release and @daiyam fixed the necessary import in d8a91cf: -const { getDefaultUserDataPath } = require('./vs/base/node/userDataPath');
+const { getUserDataPath } = require('./vs/platform/environment/node/userDataPath'); And the function function is now actually defined in vs/platform/environment/node/userDataPath.js. This would make even more variables (first environment |
No. That would be |
On Windows: Works fine after setting user environment variables though, at least! 👍🏼 |
Same as you, |
Support was added in [a recent pull request](VSCodium/vscodium#674), allowing us to just write the overrides we need in a separate file rather than changing things inside the app bundle itself.
Anything new? |
VSCodium/vscodium#418 (comment) -> VSCodium/vscodium#674 Signed-off-by: Kipras Melnikovas <[email protected]>
A quick note to help new users of this feature: the custom To use Microsoft's extension gallery, your custom {
"extensionsGallery": {
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"itemUrl": "https://marketplace.visualstudio.com/items"
}
} |
Description
This PR allows the user to customize the extensions gallery.
With environment variables:
Or, with a custom
product.json
located here:%USER%\AppData\Roaming\VSCodium
~/Library/Application Support/VSCodium
~/.config/VSCodium
Issues fixed