Closed
Description
In cases like this:
foo := func(...string) {}
var myStr string
foo("hi", <>)
we should prefer "myStr" since we know we are completing an individual string.
Also, we should add "..." to variadic completion items:
foo := func(...string) {}
var myStrs []string
foo(mySt<>) // complete to "myStrs..." instead of just "myStrs"
Consider whether we should do it for cases like this:
foo := func(...interface{}) {}
var myIntf []interface{}
foo(myIn<>) // should this complete to "myIntf..." or just "myIntf"?
Personally I think it should still expand in this case to myIntf...
because that is more likely what you want vs passing the []interface{}
as the first variadic interface{}
.