From 30f8841d0480156f4fdf5b8202d05e17ca2da4cf Mon Sep 17 00:00:00 2001 From: Xin Zhao Date: Sat, 24 Jan 2026 03:47:16 +0800 Subject: [PATCH] editor: Fix inlay hint navigation for WSL/remote file paths (#46473) Closes #46113 Release Notes: - N/A *or* Added/Fixed/Improved ... --- crates/project/src/lsp_store.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs index 61c8ec10b2e66c98dbb9a4adf68dbc67c03caead..007cdaf1d19bf799537dcfda18045ed07436a078 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, ) -> Task>> { + 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 scheme let 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