editor: Fix inlay hint navigation for WSL/remote file paths (#46473)
Closes #46113 Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
1 parent
c4747714c7
commit
30f8841d04
1 file changed
+3
-2
@@ -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 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
|
||||
|
||||
Reference in new issue
Block a user