From 1863f0b16d59b55141a74cb9e8027ab26ce14624 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 17:25:03 +0100 Subject: [PATCH] lsp: Send non-null workspaceFolders in initialize (cherry-pick #25337) (#25344) Cherry-picked lsp: Send non-null workspaceFolders in initialize (#25337) This is a ~workaround for next-ls not handling null workspace folders in initialize request Related to #25264 /cc @timfjord Closes #ISSUE Release Notes: - Changed how workspace folders are shared with language servers, fixing a startup issue with `next-ls` in the process. Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> --- crates/lsp/src/lsp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index 53bb500ac24c3f2bd23c875d8da105fd1fa897d8..fb2ae93799c18933db3a5476621c75e93a08454d 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -791,7 +791,7 @@ impl LanguageServer { }), }, trace: None, - workspace_folders: None, + workspace_folders: Some(vec![]), client_info: release_channel::ReleaseChannel::try_global(cx).map(|release_channel| { ClientInfo { name: release_channel.display_name().to_string(),