From 4fb979e3e45c17329fab1ef36610818c71511741 Mon Sep 17 00:00:00 2001 From: George Fraser Date: Sun, 8 Jul 2018 12:26:07 +0530 Subject: [PATCH] Names --- src/FSharpLanguageServer/Conversions.fs | 8 ++++---- src/FSharpLanguageServer/Program.fs | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/FSharpLanguageServer/Conversions.fs b/src/FSharpLanguageServer/Conversions.fs index 3269287..c261fb1 100644 --- a/src/FSharpLanguageServer/Conversions.fs +++ b/src/FSharpLanguageServer/Conversions.fs @@ -249,7 +249,7 @@ let goToImplementationData(goTo: CodeLens) = let resolveGoToImplementation(unresolved: CodeLens, file: FileInfo, range: Range.range): CodeLens = let command = { - title="Implementation" + title=sprintf "%s(%d)" file.Name range.StartLine command="fsharp.command.goto" arguments=[ JsonValue.String(file.FullName) @@ -264,9 +264,9 @@ let resolveGoToImplementation(unresolved: CodeLens, file: FileInfo, range: Range let resolveMissingGoToImplementation(unresolved: CodeLens, file: FileInfo): CodeLens = let command = { - title = "Missing Implementation" - command = "fsharp.command.goto" - arguments = [ + title="Not Found" + command="fsharp.command.goto" + arguments=[ JsonValue.String(file.FullName) JsonValue.Number(decimal(unresolved.range.start.line)) JsonValue.Number(decimal(unresolved.range.start.character)) diff --git a/src/FSharpLanguageServer/Program.fs b/src/FSharpLanguageServer/Program.fs index ea114da..7a7beda 100644 --- a/src/FSharpLanguageServer/Program.fs +++ b/src/FSharpLanguageServer/Program.fs @@ -609,6 +609,7 @@ type Server(client: ILanguageClient) = // For example Some(1).? will complete top-level names rather than the members of Option // Therefore, we will always re-check the file, even if it takes a while let noPartialName = partialName.QualifyingIdents.IsEmpty && partialName.PartialIdent = "" + // TODO when this is the only edited line, and the line looks like x.y.z.?, then stale completions are quite accurate let! c = checkOpenFile(file, true, not(noPartialName)) dprintfn "Finished typecheck, looking for completions..." match c with