diff --git a/src/FsAutoComplete/CommandResponse.fs b/src/FsAutoComplete/CommandResponse.fs index 592fe4a7d..3ac90efae 100644 --- a/src/FsAutoComplete/CommandResponse.fs +++ b/src/FsAutoComplete/CommandResponse.fs @@ -261,6 +261,8 @@ module CommandResponse = Parameters: Parameter list list Generics: string list } + type FsprojPeek = { Path: string; CompileItems: string list } + type WorkspacePeekResponse = { Found: WorkspacePeekFound list } and WorkspacePeekFound = @@ -269,7 +271,7 @@ module CommandResponse = and WorkspacePeekFoundDirectory = { Directory: string - Fsprojs: string list } + Fsprojs: FsprojPeek list } and WorkspacePeekFoundSolution = { Path: string @@ -453,7 +455,7 @@ module CommandResponse = | WorkspacePeek.Interesting.Directory(p, fsprojs) -> WorkspacePeekFound.Directory { WorkspacePeekFoundDirectory.Directory = p - Fsprojs = fsprojs } + Fsprojs = fsprojs |> List.map (fun f -> { Path = f.Path; CompileItems = f.CompileItems })} | WorkspacePeek.Interesting.Solution(p, sd) -> let rec item (x: Ionide.ProjInfo.InspectSln.SolutionItem) = let kind = diff --git a/src/FsAutoComplete/CommandResponse.fsi b/src/FsAutoComplete/CommandResponse.fsi index b28384d18..88f328a21 100644 --- a/src/FsAutoComplete/CommandResponse.fsi +++ b/src/FsAutoComplete/CommandResponse.fsi @@ -148,6 +148,8 @@ module CommandResponse = Parameters: Parameter list list Generics: string list } + type FsprojPeek = { Path: string; CompileItems: string list } + type WorkspacePeekResponse = { Found: WorkspacePeekFound list } and WorkspacePeekFound = @@ -156,7 +158,7 @@ module CommandResponse = and WorkspacePeekFoundDirectory = { Directory: string - Fsprojs: string list } + Fsprojs: FsprojPeek list } and WorkspacePeekFoundSolution = { Path: string diff --git a/src/FsAutoComplete/LspHelpers.fs b/src/FsAutoComplete/LspHelpers.fs index 02e15d63c..21bb41709 100644 --- a/src/FsAutoComplete/LspHelpers.fs +++ b/src/FsAutoComplete/LspHelpers.fs @@ -295,7 +295,7 @@ module Workspace = | Interesting.Directory(p, fsprojs) -> WorkspacePeekFound.Directory { WorkspacePeekFoundDirectory.Directory = p - Fsprojs = fsprojs } + Fsprojs = fsprojs |> List.map (fun x -> { Path = x.Path; CompileItems = x.CompileItems}) } | Interesting.Solution(p, sd) -> let rec item (x: Ionide.ProjInfo.InspectSln.SolutionItem) = let kind = @@ -338,7 +338,7 @@ module Workspace = | Folder folder -> folder.Items |> List.collect getProjs sln.Items |> List.collect getProjs - | WorkspacePeekFound.Directory dir -> dir.Fsprojs + | WorkspacePeekFound.Directory dir -> dir.Fsprojs |> List.map (fun x -> x.Path) let rec foldFsproj (item: WorkspacePeekFoundSolutionItem) = match item.Kind with diff --git a/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs b/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs index ebba809ec..d508fb928 100644 --- a/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs +++ b/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs @@ -333,7 +333,7 @@ type AdaptiveFSharpLspServer match peeks with | [] -> [] - | [ CommandResponse.WorkspacePeekFound.Directory projs ] -> projs.Fsprojs + | [ CommandResponse.WorkspacePeekFound.Directory projs ] -> projs.Fsprojs |> List.map (fun p -> p.Path) | CommandResponse.WorkspacePeekFound.Solution sln :: _ -> sln.Items |> List.collect Workspace.foldFsproj |> List.map fst | _ -> []