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