1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:48:32 -06:00
go/internal/lsp/testdata/builtins
Muir Manders 825cb06263 internal/lsp: downrank "nil" completion candidate
Having nil ranked normally causes it to show up as the top candidate
in cases like:

context.WithCancel(<>) // "nil" shows up before "context.Background()"

"context.Background()" gets a slight score penalty since it is a deep
completion, so "nil" is ranked highest.

Sometimes you do want "nil", but it's such a short identifier you
probably aren't leaning too heavily on autocompletion. I think it
makes sense to optimize for the case when you want something non-nil.

Change-Id: I537927db2b573535e751380c4cba5c9873dfe524
Reviewed-on: https://go-review.googlesource.com/c/tools/+/210539
Run-TryBot: Muir Manders <muir@mnd.rs>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-12-12 05:12:00 +00:00
..
builtins.go internal/lsp: downrank "nil" completion candidate 2019-12-12 05:12:00 +00:00
iota.go internal/lsp: omit "iota" completion outside const decls 2019-09-15 20:16:06 +00:00