Workarounds for LSP server download failure #6594
TENX-S
started this conversation in
Show and tell
Replies: 0 comments 1 reply
-
thx bro~ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
You may encounter LSP server download failures if you are using Zed in China, as seen in issue #1352, #1377. Here are two possible workarounds to address this error:
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
Execute the script and run
zed <your project path>
in the terminal. This should work now.However, there are two things to keep in mind:
a. Due to the instability of the Great Firewall (GFW), the LSP server may sometimes download slowly or fail to download altogether, depending on the GFW's mood :( . If this happens, temporary download files will be left in the directory
$HOME/Library/Application Support/Zed/languages
when you exit Zed. It's important to delete these files to avoid clutter. For instance, in the case of Rust, we should delete therust-analyzer
folder.b. Since Zed automatically downloads the latest LSP server at startup, It's recommended to launch Zed from a shell where the
http_proxy
env variable is set. This step will no longer be necessary once issue #887 is resolved.This method can be useful when there is no network.
Beta Was this translation helpful? Give feedback.
All reactions