From 523d8594061db8d048985bcf39ebce1f8dd4e0e9 Mon Sep 17 00:00:00 2001 From: Robert Findley Date: Sun, 9 Jan 2022 09:00:22 -0500 Subject: [PATCH] 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 Run-TryBot: Robert Findley Reviewed-by: Hyang-Ah Hana Kim gopls-CI: kokoro TryBot-Result: Gopher Robot --- internal/lsp/source/options.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/lsp/source/options.go b/internal/lsp/source/options.go index f6f952f856..285527b8f2 100644 --- a/internal/lsp/source/options.go +++ b/internal/lsp/source/options.go @@ -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() {