internal/lsp/source: use the fastfuzzy matcher in experimental mode

The fastfuzzy matcher is around 3x faster than the fuzzy matcher for
queries that need to search a large number of symbols, and has improved
scoring due to built-in knowledge about the structure of Go symbols.

Enable it in experimental builds of gopls, with plans to enable it by
default in the next release.

For golang/go#50016

Change-Id: Ie2c333f248bb8397d92f52fbbfdd2bf623372d0a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/377434
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Robert Findley 2022-01-09 09:00:22 -05:00
parent 6299a6dbc2
commit 523d859406
1 changed files with 1 additions and 0 deletions

View File

@ -751,6 +751,7 @@ func (o *Options) EnableAllExperiments() {
o.ExperimentalPostfixCompletions = true
o.ExperimentalUseInvalidMetadata = true
o.ExperimentalWatchedFileDelay = 50 * time.Millisecond
o.SymbolMatcher = SymbolFastFuzzy
}
func (o *Options) enableAllExperimentMaps() {