Failing to complete inside call-site
oblitum opened this issue · comments
This issue can be tested with bingo's own source code, in main.go
, I don't get completion for log.Println(http.
at the following location:
Line 56 in 4d5e0eb
I get completions after just log.
or just http.
, but not after log.Println(http.
.
I'm not sure how to reduce it, since in simpler trivial code I couldn't reproduce it.
@saibing yes, the position you tested is ok, but in Line 56, it failed.
Steps:
- vim main.go
56gg
jumps to Line 56o
to insert new linelog.Println(http.
, failed
Tested with nvim+coc .
Not sure what is wrong here but deep down, net/http
is being returned as a candidate but the Score
doesn't seem right. In the below, {Label:http Detail:"net/http" Kind:10 Score:1}
, is present.
items=[{Label:context Detail:"context" Kind:10 Score:1} {Label:debug Detail:"runtime/debug" Kind:10 Score:1} {Label:flag Detail:"flag" Kind:10 Score:1} {Label:fmt Detail:"fmt" Kind:10 Score:1} {Label:http Detail:"net/http" Kind:10 Score:1} {Label:io Detail:"io" Kind:10 Score:1} {Label:jsonrpc2 Detail:"github.com/sourcegraph/jsonrpc2" Kind:10 Score:1} {Label:langserver Detail:"github.com/saibing/bingo/langserver" Kind:10 Score:1} {Label:log Detail:"log" Kind:10 Score:1} {Label:net Detail:"net" Kind:10 Score:1} {Label:os Detail:"os" Kind:10 Score:1} {Label:strings Detail:"strings" Kind:10 Score:1} {Label:time Detail:"time" Kind:10 Score:1} {Label:addr Detail:*string Kind:7 Score:1} {Label:buildTags Detail:*string Kind:7 Score:1} {Label:diagnosticsStyle Detail:*string Kind:7 Score:1} {Label:disableFuncSnippet Detail:*bool Kind:7 Score:1} {Label:enhanceSignatureHelp Detail:*bool Kind:7 Score:1} {Label:formatStyle Detail:*string Kind:7 Score:1} {Label:freeosmemory Detail:*int Kind:7 Score:1} {Label:globalCacheStyle Detail:*string Kind:7 Score:1} {Label:goimportsPrefix Detail:*string Kind:7 Score:1} {Label:logfile Detail:*string Kind:7 Score:1} {Label:main() Detail: Kind:8 Score:1} {Label:maxparallelism Detail:*int Kind:7 Score:1} {Label:mode Detail:*string Kind:7 Score:1} {Label:pprof Detail:*string Kind:7 Score:1} {Label:printVersion Detail:*bool Kind:7 Score:1} {Label:trace Detail:*bool Kind:7 Score:1} {Label:version = "v2-dev" Detail:string Kind:4 Score:1} {Label:append(slice []T, elems ...T) Detail:[]T Kind:8 Score:0.1} {Label:bool Detail: Kind:3 Score:0.1} {Label:byte Detail: Kind:3 Score:0.1} {Label:cap(v []T) Detail:int Kind:8 Score:0.1} {Label:close(c chan<- T) Detail: Kind:8 Score:0.1} {Label:complex(real float64, imag float64) Detail:complex128 Kind:8 Score:0.1} {Label:complex128 Detail: Kind:3 Score:0.1} {Label:complex64 Detail: Kind:3 Score:0.1} {Label:copy(dst []T, src []T) Detail:int Kind:8 Score:0.1} {Label:delete(m map[K]V, key K) Detail: Kind:8 Score:0.1} {Label:error Detail: Kind:1 Score:0.1} {Label:false Detail: Kind:4 Score:0.1} {Label:float32 Detail: Kind:3 Score:0.1} {Label:float64 Detail: Kind:3 Score:0.1} {Label:imag(complex128) Detail:float64 Kind:8 Score:0.1} {Label:int Detail: Kind:3 Score:0.1} {Label:int16 Detail: Kind:3 Score:0.1} {Label:int32 Detail: Kind:3 Score:0.1} {Label:int64 Detail: Kind:3 Score:0.1} {Label:int8 Detail: Kind:3 Score:0.1} {Label:iota Detail: Kind:4 Score:0.1} {Label:len(T) Detail:int Kind:8 Score:0.1} {Label:make(t T, size ...int) Detail:T Kind:8 Score:0.1} {Label:new(T) Detail:*T Kind:8 Score:0.1} {Label:nil Detail: Kind:7 Score:0.1} {Label:panic(interface{}) Detail: Kind:8 Score:0.1} {Label:print(args ...T) Detail: Kind:8 Score:0.1} {Label:println(args ...T) Detail: Kind:8 Score:0.1} {Label:real(complex128) Detail:float64 Kind:8 Score:0.1} {Label:recover() Detail:interface{} Kind:8 Score:0.1} {Label:rune Detail: Kind:3 Score:0.1} {Label:string Detail: Kind:3 Score:0.1} {Label:true Detail: Kind:4 Score:0.1} {Label:uint Detail: Kind:3 Score:0.1} {Label:uint16 Detail: Kind:3 Score:0.1} {Label:uint32 Detail: Kind:3 Score:0.1} {Label:uint64 Detail: Kind:3 Score:0.1} {Label:uint8 Detail: Kind:3 Score:0.1} {Label:uintptr Detail: Kind:3 Score:0.1}]
Thanks. That's fixed. I just noticed though that signatureHelp isn't working at that spot too.