-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Allow custom npmconfig to be defined in settings.json #9422
Comments
Just a side note, I'd be glad to work this if someone could point me in the right direction for how to add user defined values to the settings.json. |
🙏 |
This is the main issue stopping me from using zed as my daily driver at work. Any time I edit some JSON or YAML I get an error saying zed couldn't download the language server. Tried to set my job's proxy settings on various npmrc files, but no dice. |
Adding `proxy` keyword to configure proxy while using zed. After setting the proxy, restart Zed to acctually use the proxy. Example setting: ```rust "proxy" = "socks5://localhost:10808" "proxy" = "http://127.0.0.1:10809" ``` Closes zed-industries#9424, closes zed-industries#9422, closes zed-industries#8650, closes zed-industries#5032, closes zed-industries#6701, closes zed-industries#11890 Release Notes: - Added settings to configure proxy in Zed --------- Co-authored-by: Jason Lee <huacnlee@gmail.com>
Proxy settings is not enough to close this issue. There are other settings like registry that need to be set via custom npmconfig. |
This is an issue at my workplace as well. I've tried to manually override the NPM configuration file of the NodeJS run-time with no luck. |
@SomeoneToIgnore can you reopen this issue? |
|
When using intermediary certificates (e.g. those provided by Zscaler), node related downloads triggered by Zed are going to fail due to the fact that npm has to be configured properly as described here: https://help.zscaler.com/zia/adding-custom-certificate-application-specific-trust-store#npm An option to point Zed to the proper npm configuration to use would be much appreciated. |
Being able to specify a Node path would be very useful for NixOS which can't run unpatched binaries, resulting in errors. So far I've resorted to putting patched Node in the .local/share where zed expects it and it seems to work, but the proper way of being able to add a path to the config file would be much better |
@tobiaseichert @sa1 @ArielLahiany please see my comment here, I think I found a workaround. |
Check for existing issues
Describe the feature
Issue:
When trying to install a language server or anything that utilizes Node, it uses a default blank config for the --userconfig and --globalconfig. This leads to it pulling its packages from
registry.npmjs.org
by default, without an option to specify a different location to pull node packages from.When behind proxies or at some work places, that registry may be blocked or you may want to pull packages from another source.
Proposal:
Since it looks like Zed bundles a node runtime to avoid issues and different node versions may return unexpected results, I don't think having a setting to specify the node path would be needed. But it would be great if we add an option in the user settings to specify the configs to use.
Something like this being added to settings would work:
Possible solution:
I did a bit of digging into the issue and it looks like a user specified path could be added here, where it will default to the blank file by default:
Zed calls node with the blankconfigs here:
zed/crates/node_runtime/src/node_runtime.rs
Lines 218 to 224 in eecbafb
As a temporary workaround I tried modifying the blank configs with a proper config but it looks like each time a command is run it will re-write the default blank config files:
zed/crates/node_runtime/src/node_runtime.rs
Lines 144 to 172 in eecbafb
I think this would be pretty simple to add and tried taking a look at it as well, but I have no prior rust experience. I did take a look at maybe adding something like this to the node_runtime.js file.
If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: