You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/fuzzy: improvements to the symbol scoring algorithm
Based on feedback in golang/go#60027, tweak the fuzzy symbol scoring
algorithm to much more strongly prefer sequential and exact matches.
Fixesgolang/go#60027
Change-Id: I1c6d019065c4dff4adf2db9e94397a635e13d50f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/493623
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Copy file name to clipboardExpand all lines: gopls/internal/lsp/cmd/workspace_symbol.go
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ import (
8
8
"context"
9
9
"flag"
10
10
"fmt"
11
+
"strings"
11
12
12
13
"golang.org/x/tools/gopls/internal/lsp/protocol"
13
14
"golang.org/x/tools/gopls/internal/lsp/source"
@@ -16,7 +17,7 @@ import (
16
17
17
18
// workspaceSymbol implements the workspace_symbol verb for gopls.
18
19
typeworkspaceSymbolstruct {
19
-
Matcherstring`flag:"matcher" help:"specifies the type of matcher: fuzzy, caseSensitive, or caseInsensitive.\nThe default is caseInsensitive."`
20
+
Matcherstring`flag:"matcher" help:"specifies the type of matcher: fuzzy, fastfuzzy, casesensitive, or caseinsensitive.\nThe default is caseinsensitive."`
0 commit comments