1
0
mirror of https://github.com/golang/go synced 2024-10-01 09:38:36 -06:00
go/internal
Muir Manders fe7c687bb5 internal/lsp: don't lower score of builtin completions
Downranking builtins causes weird interplay with other completion
candidates due to fuzzy matching. For example:

notNil := 123
var foo *int = nil<>

ranks "notNil" before "nil" in the builtin list, which is counter
productive.

Change it to not downrank builtins. In my testing with this change,
builtins never were ranked above lexical items with similar names. I
think this is because the "natural" order of completion items puts
builtins last, and we stable sort items by score, so their relative
order is preserved.

Change-Id: Ifbad02be205e3cb26c1d4ce500b77690e7ac5b04
Reviewed-on: https://go-review.googlesource.com/c/tools/+/193897
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-09-06 20:37:48 +00:00
..
apidiff all: skip tests if required tools are not found 2019-08-30 15:40:57 +00:00
fastwalk internal/fastwalk: avoid slice bounds out of range for long file names 2018-11-12 23:16:31 +00:00
gopathwalk internal/imports: skip scanned module cache dirs 2019-08-29 21:03:13 +00:00
imports internal/imports: ignore invalid mod cache entries 2019-09-05 17:34:53 +00:00
jsonrpc2 internal/lsp: use a background context for the background worker 2019-07-18 19:01:55 +00:00
lsp internal/lsp: don't lower score of builtin completions 2019-09-06 20:37:48 +00:00
memoize internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00
module imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00
semver go/packages: add name= query 2018-10-16 20:20:09 +00:00
span internal/span: handle character values beyond end of line in FromUTF16Column 2019-07-06 07:08:13 +00:00
telemetry internal/telemetry/export/ocagent: fix typo in comment 2019-09-06 17:19:43 +00:00
testenv all: skip more memory-intensive tests on linux-arm 2019-08-30 17:05:41 +00:00
tool internal/tool: add a small package to unify the flag handling across all our tools 2018-12-17 23:08:00 +00:00
txtar imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00
xcontext internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00