Allow using system node (#18172)
Release Notes: - (Potentially breaking change) Zed will now use the node installed on your $PATH (if it is more recent than v18) instead of downloading its own. You can disable the new behavior with `{"node": {"disable_path_lookup": true}}` in your settings. We do not yet use system/project-local node_modules. --------- Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
e4080ef565
commit
3ba071b993
34 changed files with 614 additions and 391 deletions
|
@ -17,7 +17,7 @@ use async_trait::async_trait;
|
|||
use client::{proto, TypedEnvelope};
|
||||
use collections::{btree_map, BTreeMap, HashMap, HashSet};
|
||||
use futures::{
|
||||
future::{join_all, BoxFuture, Shared},
|
||||
future::{join_all, Shared},
|
||||
select,
|
||||
stream::FuturesUnordered,
|
||||
AsyncWriteExt, Future, FutureExt, StreamExt,
|
||||
|
@ -27,7 +27,7 @@ use gpui::{
|
|||
AppContext, AsyncAppContext, Context, Entity, EventEmitter, Model, ModelContext, PromptLevel,
|
||||
Task, WeakModel,
|
||||
};
|
||||
use http_client::{AsyncBody, HttpClient, Request, Response, Uri};
|
||||
use http_client::{BlockedHttpClient, HttpClient};
|
||||
use language::{
|
||||
language_settings::{
|
||||
all_language_settings, language_settings, AllLanguageSettings, FormatOnSave, Formatter,
|
||||
|
@ -7979,35 +7979,6 @@ impl LspAdapterDelegate for LocalLspAdapterDelegate {
|
|||
}
|
||||
}
|
||||
|
||||
struct BlockedHttpClient;
|
||||
|
||||
impl HttpClient for BlockedHttpClient {
|
||||
fn send(
|
||||
&self,
|
||||
_req: Request<AsyncBody>,
|
||||
) -> BoxFuture<'static, Result<Response<AsyncBody>, anyhow::Error>> {
|
||||
Box::pin(async {
|
||||
Err(std::io::Error::new(
|
||||
std::io::ErrorKind::PermissionDenied,
|
||||
"ssh host blocked http connection",
|
||||
)
|
||||
.into())
|
||||
})
|
||||
}
|
||||
|
||||
fn proxy(&self) -> Option<&Uri> {
|
||||
None
|
||||
}
|
||||
|
||||
fn send_with_redirect_policy(
|
||||
&self,
|
||||
req: Request<AsyncBody>,
|
||||
_: bool,
|
||||
) -> BoxFuture<'static, Result<Response<AsyncBody>, anyhow::Error>> {
|
||||
self.send(req)
|
||||
}
|
||||
}
|
||||
|
||||
struct SshLspAdapterDelegate {
|
||||
lsp_store: WeakModel<LspStore>,
|
||||
worktree: worktree::Snapshot,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue