internal/lsp/source: use bestMatch for fully qualified symbol style

Currently, fully qualified symbol style does a simple match against a
fully qualified symbol. However, this doesn't really match the user's
intent. Much like the dynamic style, the match should be done "from the
right" (per the logic of bestMatch) with the results being fully
qualified for presentational reasons.

We therefore reuse the logic from the dynamic symbol style, but instead
return a matched symbol as the fully qualified value.

Change-Id: I5c8c6b647c0710c5054bc8e27dbb29cb0fac14d8
Reviewed-on: https://go-review.googlesource.com/c/tools/+/266557
Run-TryBot: Paul Jolly <paul@myitcv.org.uk>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Paul Jolly <paul@myitcv.org.uk>
diff --git a/internal/lsp/source/workspace_symbol.go b/internal/lsp/source/workspace_symbol.go
index effa86a..6ca476e 100644
--- a/internal/lsp/source/workspace_symbol.go
+++ b/internal/lsp/source/workspace_symbol.go
@@ -64,9 +64,9 @@
 type symbolizer func(name string, pkg Package, m matcherFunc) (string, float64)
 
 func fullyQualifiedSymbolMatch(name string, pkg Package, matcher matcherFunc) (string, float64) {
-	fullyQualified := pkg.PkgPath() + "." + name
-	if matcher(fullyQualified) > 0 {
-		return fullyQualified, 1
+	_, score := dynamicSymbolMatch(name, pkg, matcher)
+	if score > 0 {
+		return pkg.PkgPath() + "." + name, score
 	}
 	return "", 0
 }