mirror of
https://github.com/golang/go
synced 2024-10-01 07:28:35 -06:00
6afc7fcab5
Invert "useDeepCompletions" config flag to "disableDeepCompletion" and separate out "disableFuzzyMatching" which reverts to the previous prefix matching behavior. I separated fuzzy matching tests out to a separate file so they aren't entangled with deep completion tests. In coming up with representative test cases I found a couple issues which I fixed: - We were treating a fuzzy matcher score of 0 as no match, but the matcher returns 0 for candidates that match but have no bonuses. I changed the matcher interface so that a score of 0 counts as a match. For example, this was preventing a pattern of "o" from matching "foo". - When we lower a candidate's score based on its depth, we were subtracting a static multiplier which could result in the score going negative. A negative score messes up future score weighting because multiplying it by a value in the range [0, 1) makes it bigger instead of smaller. Fix by scaling a candidate's score based on its depth rather than subtracting a constant factor. Updates golang/go#32754 Change-Id: Ie6f9111f1696b0d067d08f7eed7b0a338ad9cd67 Reviewed-on: https://go-review.googlesource.com/c/tools/+/192137 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
browser | ||
cache | ||
cmd | ||
debug | ||
diff | ||
fuzzy | ||
protocol | ||
snippet | ||
source | ||
telemetry | ||
testdata | ||
tests | ||
code_action.go | ||
completion.go | ||
definition.go | ||
diagnostics.go | ||
folding_range.go | ||
format.go | ||
general.go | ||
highlight.go | ||
hover.go | ||
link.go | ||
lsp_test.go | ||
references.go | ||
rename.go | ||
reset_golden.sh | ||
server.go | ||
signature_help.go | ||
symbols.go | ||
text_synchronization.go | ||
util.go | ||
watched_files.go | ||
workspace.go |