auto completion doesn't work inside Goroutines.
OneOfOne opened this issue · comments
Ahmed W. commented
Related:
saibing commented
bingo's auto completion works well inside Goroutine.
Can you give me a specific scene example that bingo does not?
Ahmed W. commented
┏━ oneofone@Ava ❰✪/s/bingo❱ ❰master|✔❱
┗━● git describe --always
65a1d72 << bingo commit
┏━ oneofone@Ava ❰/t/x❱
┗━● cat go.mod
module x
go 1.13
┏━ oneofone@Ava ❰/t/x❱
┗━● cat main.go
package main
import "bufio"
func main() {
br := bufio.NewReader(nil)
go func() {
br.
}()
}
Settings:
"go.alternateTools": {
"go-langserver": "bingo"
},
"go.useLanguageServer": true,
"go.languageServerFlags": ["-enhance-signature-help"],
"go.languageServerExperimentalFeatures": {
"format": true,
"autoComplete": true,
"rename": true,
"goToDefinition": true,
"hover": true,
"signatureHelp": true,
"goToTypeDefinition": true,
"goToImplementation": true,
"documentSymbols": true,
"workspaceSymbols": true,
"findReferences": true
},
Ahmed W. commented
Looking at vscode go-langserver
's output, I got this:
[Error - 7:59:54 PM] Request textDocument/signatureHelp failed.
Message: the enclosing function is malformed
Code: 0
[Error - 8:00:01 PM] Request textDocument/formatting failed.
Message: /tmp/x/main.go:9:2: expected selector or type assertion, found '}' (and 1 more errors)
Code: 0
Ahmed W. commented
removing the go
keyword fixes it.
inliquid commented
Same in defer
statements.
_mdhs commented
According to golang/go#29313, this is a special case, which needs workaround.
saibing commented
@OneOfOne @inliquid @imjustfly
I have fixed it, please try latest version bingo.
Francisco Lopes commented
Maybe this issue has some relation with this other.