Skip to content

Commit

Permalink
gopls: make 'fastfuzzy' the default fuzzy matcher for workspace symbols
Browse files Browse the repository at this point in the history
For dense queries, the fastfuzzy matcher is around 3x faster. It also
has improved scoring for exact matches of CamelCase words or path
segments.

Fixes golang/go#50016

Change-Id: I04cae11cbc54de59d54733836876a9ee759c80b6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/382394
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
  • Loading branch information
findleyr committed Feb 3, 2022
1 parent ea5e1dc commit eeb95ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gopls/doc/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ Must be one of:
* `"FastFuzzy"`
* `"Fuzzy"`

Default: `"Fuzzy"`.
Default: `"FastFuzzy"`.

##### **symbolStyle** *enum*

Expand Down
2 changes: 1 addition & 1 deletion internal/lsp/source/api_json.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/lsp/source/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func DefaultOptions() *Options {
},
NavigationOptions: NavigationOptions{
ImportShortcut: Both,
SymbolMatcher: SymbolFuzzy,
SymbolMatcher: SymbolFastFuzzy,
SymbolStyle: DynamicSymbols,
},
CompletionOptions: CompletionOptions{
Expand Down

0 comments on commit eeb95ae

Please sign in to comment.