1
0
mirror of https://github.com/golang/go synced 2024-10-01 07:28:35 -06:00
go/internal/lsp
Muir Manders 6afc7fcab5 internal/lsp: enable deep completion and fuzzy matching by default
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>
2019-08-30 16:47:54 +00:00
..
browser internal/lsp: add version and bug commands 2019-05-11 04:16:02 +00:00
cache x/tools/gopls: add fallback to default GOPATH if missing 2019-08-30 08:22:54 +00:00
cmd go/packages,internal/lsp: skip memory-intensive tests on the linux-arm builder 2019-08-29 20:36:57 +00:00
debug internal/telemetry: add the ability to flush telemetry data 2019-08-21 16:29:56 +00:00
diff internal/lsp: add tests at the diff hook layer 2019-08-26 23:40:50 +00:00
fuzzy internal/lsp: add fuzzy completion matching 2019-08-14 16:13:50 +00:00
protocol x/tools/gopls: reimplement rpc logging at a lower level 2019-08-29 16:05:15 +00:00
snippet internal/lsp: introduce snippet builder object 2019-04-25 18:37:29 +00:00
source internal/lsp: enable deep completion and fuzzy matching by default 2019-08-30 16:47:54 +00:00
telemetry internal/telemetry: extract units to their own package 2019-08-15 21:28:32 +00:00
testdata internal/lsp: enable deep completion and fuzzy matching by default 2019-08-30 16:47:54 +00:00
tests internal/lsp: enable deep completion and fuzzy matching by default 2019-08-30 16:47:54 +00:00
code_action.go internal/lsp: initialize CodeActionProvider with supported actions 2019-08-28 21:14:09 +00:00
completion.go internal/lsp: enable deep completion and fuzzy matching by default 2019-08-30 16:47:54 +00:00
definition.go internal/lsp: use protocol.Ranges for source.Identifier 2019-08-29 05:14:58 +00:00
diagnostics.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
folding_range.go internal/lsp: add foldingRange support 2019-08-29 20:17:30 +00:00
format.go internal/lsp: use protocol.Range in completion items 2019-08-20 20:57:17 +00:00
general.go internal/lsp: enable deep completion and fuzzy matching by default 2019-08-30 16:47:54 +00:00
highlight.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
hover.go internal/lsp: use protocol.Ranges for source.Identifier 2019-08-29 05:14:58 +00:00
link.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
lsp_test.go internal/lsp: enable deep completion and fuzzy matching by default 2019-08-30 16:47:54 +00:00
references.go internal/lsp: use protocol.Ranges for source.Identifier 2019-08-29 05:14:58 +00:00
rename.go internal/lsp: add prepare rename support 2019-08-29 20:19:46 +00:00
reset_golden.sh internal/lsp: fix definition tests to use golden files 2019-05-10 21:06:55 +00:00
server.go internal/lsp: enable deep completion and fuzzy matching by default 2019-08-30 16:47:54 +00:00
signature_help.go internal/lsp: use protocol.Ranges for source.Identifier 2019-08-29 05:14:58 +00:00
symbols.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
text_synchronization.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
util.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
watched_files.go internal/lsp: start handling watched file change events 2019-08-26 19:00:32 +00:00
workspace.go internal/lsp: use x/xerrors to create new errors 2019-08-06 19:46:56 +00:00