1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:38:33 -06:00

internal/lsp: filter on insert text, not label

Change-Id: Ibd0c0c7af57cc8aeec56188cf52300f7c558adfe
Reviewed-on: https://go-review.googlesource.com/c/tools/+/167464
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Rebecca Stambler 2019-03-13 20:59:59 -04:00
parent 4ccd092f47
commit 1286b2016b

View File

@ -49,7 +49,8 @@ func toProtocolCompletionItems(candidates []source.CompletionItem, prefix string
// This is a hack so that the client sorts completion results in the order
// according to their score. This can be removed upon the resolution of
// https://github.com/Microsoft/language-server-protocol/issues/348.
SortText: fmt.Sprintf("%05d", i),
SortText: fmt.Sprintf("%05d", i),
FilterText: insertText,
}
// If we are completing a function, we should trigger signature help if possible.
if triggerSignatureHelp && signatureHelpEnabled {