From 0e44f9317824803141cb755e2d67584452c5db76 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Sun, 2 Mar 2025 23:09:13 +0100 Subject: [PATCH] lsp: Do not add trailing slash to workspace folders (#25903) Closes #25390 Release Notes: - Fixed issues with ansible-language-server sending phantom diagnostic updates --- crates/project/src/lsp_store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs index 0be83a6a6bb54e9786301a46a18f18dce57f6295..3c3dc7b2db786a52f327c6e6d17f98e5b6a6fb31 100644 --- a/crates/project/src/lsp_store.rs +++ b/crates/project/src/lsp_store.rs @@ -1917,7 +1917,7 @@ impl LocalLspStore { } } language::Attach::Shared => { - let uri = Url::from_directory_path( + let uri = Url::from_file_path( worktree.read(cx).abs_path().join(&path.path), ); let key = (worktree_id, server_name.clone()); @@ -3825,7 +3825,7 @@ impl LspStore { } } language::Attach::Shared => { - let uri = Url::from_directory_path( + let uri = Url::from_file_path( worktree.read(cx).abs_path().join(&path.path), ); let key = (worktree_id, server_name.clone());