1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:04:44 -07:00
go/internal/lsp/testdata
Muir Manders c07e1c6ef6 internal/lsp: improve variadic completion
Improve candidate ranking when completing the variadic parameter of
function calls.

Using the example:

func foo(strs ...string) {}

- When completing foo(<>), we prefer candidates of type []string or
  string (previously we only preferred []string).

- When completing foo("hi", <>), we prefer candidates of type
  string (previously we preferred []string).

- When completing foo(<>), we use a snippet to add on the "..."
  automatically to candidates of type []string.

I also fixed completion tests to work properly when you have multiple
notes referring to the same position. For example:

foo() //@rank(")", a, b),rank(")", a, c)

Previously the second "rank" was silently overwriting the first
because they both refer to the same ")".

Fixes golang/go#34334.

Change-Id: I4f64be44a4ccbb533fb7682738c759cbca3a93cd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/205117
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-11-07 18:57:33 +00:00
..
analyzer go/analysis: rename reportNodef to ReportRangef 2019-10-28 19:16:33 +00:00
anon
arraytype internal/lsp: improve completion for *ast.ArrayTypes 2019-10-23 16:34:50 +00:00
bad internal/lsp: do not close over the handle in the memoize function 2019-10-30 00:30:36 +00:00
badstmt internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
bar internal/lsp: improve completion for *ast.ArrayTypes 2019-10-23 16:34:50 +00:00
basiclit
baz internal/lsp: search candidate type's package for completions 2019-10-30 06:26:58 +00:00
builtins internal/lsp: omit "iota" completion outside const decls 2019-09-15 20:16:06 +00:00
casesensitive internal/lsp: provide option for case sensitive completion 2019-09-26 16:59:42 +00:00
cast
channel internal/lsp: apply type modifiers to completion candidate 2019-06-19 20:27:14 +00:00
comments
complit internal/lsp/source: fixes completion for slice literals of pointers 2019-08-30 17:14:47 +00:00
constant
deep internal/lsp: search for deep completions across function calls 2019-10-17 03:50:25 +00:00
errors internal/lsp: match completions case-insensitively 2019-06-28 03:43:36 +00:00
fieldlist internal/lsp: improve completions in *ast.FieldList 2019-09-25 22:58:16 +00:00
folding internal/lsp: fix regeneration of golden files 2019-09-25 13:16:59 +00:00
foo internal/lsp: fix bad *ast.ArrayTypes for completion 2019-10-17 20:53:01 +00:00
format internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
func_rank internal/lsp: move function signature into detail instead of label 2019-07-03 21:07:46 +00:00
funcsig internal/lsp: fix scope of FuncType completion candidates 2019-09-25 19:53:33 +00:00
funcvalue internal/lsp: move function signature into detail instead of label 2019-07-03 21:07:46 +00:00
fuzzy internal/lsp: reorganize completion tests 2019-09-24 17:09:08 +00:00
generated internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
godef internal/lsp/cmd: re-enable the definition cmd tests 2019-11-04 17:18:34 +00:00
good internal/lsp: remove duplicated enums 2019-09-25 15:30:23 +00:00
highlights
implementation internal/lsp: add support for implements to the LSP 2019-10-31 16:03:44 +00:00
importedcomplit
imports internal/lsp: do not format the file on import organization 2019-11-04 17:18:53 +00:00
index
interfacerank internal/lsp: apply type modifiers to completion candidate 2019-06-19 20:27:14 +00:00
keywords internal/lsp: add some keyword completions 2019-10-22 20:49:18 +00:00
labels internal/lsp: fix label completion in range and type switch stmts 2019-10-22 21:33:09 +00:00
links internal/lsp: add links search in comments and string literals 2019-07-12 18:53:41 +00:00
maps internal/lsp: improve completions in *ast.MapType 2019-10-24 19:03:17 +00:00
nested_complit internal/lsp: improve completion for *ast.ArrayTypes 2019-10-23 16:34:50 +00:00
nodisk internal/lsp: fix race condition in metadata handling 2019-11-04 20:35:57 +00:00
noparse internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
noparse_format internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
rank internal/lsp/testdata: change test case to work around CL 202581 2019-10-30 21:10:04 +00:00
references internal/lsp: fix declarations in references 2019-09-05 03:51:44 +00:00
rename internal/lsp: change the unified diff tests to be less fragile 2019-09-27 19:13:25 +00:00
selector internal/lsp: move function signature into detail instead of label 2019-07-03 21:07:46 +00:00
signature tools/gopls: add cmd support for signature 2019-10-31 22:07:37 +00:00
snippets internal/lsp: don't qualify literal candidates in *ast.SelectorExpr 2019-10-16 23:29:27 +00:00
suggestedfix internal/lsp: enable suggested fixes by default 2019-09-09 19:40:07 +00:00
symbols tools/gopls: add cmd support for symbols 2019-11-01 17:43:07 +00:00
testy internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
typeassert internal/lsp: improve completion support for type assertions 2019-06-26 23:33:08 +00:00
types
unimported internal/lsp: use available type info for unimported completions 2019-11-04 21:31:10 +00:00
unresolved internal/lsp: fix function value completions 2019-06-20 15:43:39 +00:00
unsafe
variadic internal/lsp: improve variadic completion 2019-11-07 18:57:33 +00:00
summary.txt.golden internal/lsp: improve variadic completion 2019-11-07 18:57:33 +00:00