mirror of
https://github.com/golang/go
synced 2024-09-30 20:28:32 -06:00
2047c2d578
Offer "struct", "interface", "map", "chan", and "func" keywords when we expect a type. For example "var foo i<>" will offer "interface". Because "struct" and "interface" are more often used when declaring named types, they get a higher score in type declarations. Otherwise, "map", "chan" and "func" get a higher score. I also got rid of the special keyword scoring. Now keywords just use stdScore and highScore. This makes the interplay with other types of candidates more predictable. Keywords are offered in pretty limited contexts, so I don't think they will be annoying. Finally, keyword candidate score is now to be scaled properly based on how well they match the prefix. Previously they weren't penalized for not matching well, so there were probably some situations where keywords were ranked too high. Updates golang/go#34009. Change-Id: I0b659c00a8503cd72da28853dfe54fcb67f734ae Reviewed-on: https://go-review.googlesource.com/c/tools/+/220503 Run-TryBot: Muir Manders <muir@mnd.rs> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
apidiff | ||
fastwalk | ||
gocommand | ||
gopathwalk | ||
imports | ||
jsonrpc2 | ||
lsp | ||
memoize | ||
packagesinternal | ||
span | ||
telemetry | ||
testenv | ||
tool | ||
xcontext |