Skip to content

Commit

Permalink
internal/lsp/source: use the fastfuzzy matcher in experimental mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
findleyr committed Jan 19, 2022
1 parent 6299a6d commit 523d859
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/lsp/source/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 523d859

Please sign in to comment.