From 292e788875d1981fd16e6e34696b196c9ba09f53 Mon Sep 17 00:00:00 2001 From: oupson <31827294+oupson@users.noreply.github.com> Date: Mon, 29 Apr 2024 18:30:51 +0200 Subject: [PATCH] Use actualRootPath instead of p.RootPath when peeking workspaces. (#1278) This fix the issue where rootUri was ignored when using AutomaticWorkspaceInit. --- src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs b/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs index fcbdb86fc..4945e8389 100644 --- a/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs +++ b/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs @@ -316,15 +316,12 @@ type AdaptiveFSharpLspServer | None -> p.RootPath let projs = - match p.RootPath, c.AutomaticWorkspaceInit with + match actualRootPath, c.AutomaticWorkspaceInit with | None, _ | _, false -> state.WorkspacePaths - | Some actualRootPath, true -> + | Some rootPath, true -> let peeks = - WorkspacePeek.peek - actualRootPath - c.WorkspaceModePeekDeepLevel - (c.ExcludeProjectDirectories |> List.ofArray) + WorkspacePeek.peek rootPath c.WorkspaceModePeekDeepLevel (c.ExcludeProjectDirectories |> List.ofArray) |> List.map Workspace.mapInteresting |> List.sortByDescending (fun x -> match x with