Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
editor: Fix inlay hint navigation for WSL/remote file paths (#46473)
Xin Zhao30f8841d0480
diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rsindex 61c8ec10b2e..007cdaf1d19 100644--- a/crates/project/src/lsp_store.rs+++ b/crates/project/src/lsp_store.rs@@ -125,7 +125,7 @@ use text::{Anchor, BufferId, LineEnding, OffsetRangeExt, ToPoint as _};use util::{ConnectionResult, ResultExt as _, debug_panic, defer, maybe, merge_json_value_into,- paths::{PathStyle, SanitizedPath},+ paths::{PathStyle, SanitizedPath, UrlExt},post_inc,redact::redact_command,rel_path::RelPath,@@ -8719,13 +8719,14 @@ impl LspStore {language_server_id: LanguageServerId,cx: &mut Context<Self>,) -> Task<Result<Entity<Buffer>>> {+ let path_style = self.worktree_store.read(cx).path_style();cx.spawn(async move |lsp_store, cx| {// Escape percent-encoded string.let current_scheme = abs_path.scheme().to_owned();// Uri is immutable, so we can't modify the schemelet abs_path = abs_path- .to_file_path()+ .to_file_path_ext(path_style).map_err(|()| anyhow!("can't convert URI to path"))?;let p = abs_path.clone();let yarn_worktree = lsp_store