Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion fcs/samples/EditorService/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
open System
open Microsoft.FSharp.Compiler
open Microsoft.FSharp.Compiler.SourceCodeServices
open Microsoft.FSharp.Compiler.QuickParse

// Create an interactive checker instance (ignore notifications)
let checker = FSharpChecker.Create()
Expand Down Expand Up @@ -36,9 +37,11 @@ let tip = parsed.GetToolTipText(2, 7, inputLines.[1], [ "foo" ], identTokenTag)

printfn "%A" tip

let partialName = GetPartialLongNameEx(inputLines.[4], 23)

// Get declarations (autocomplete) for a location
let decls =
parsed.GetDeclarationListInfo(Some untyped, 5, 23, inputLines.[4], [], "msg", (fun () -> []))
parsed.GetDeclarationListInfo(Some untyped, 5, inputLines.[4], partialName, (fun () -> []))
|> Async.RunSynchronously

for item in decls.Items do
Expand Down