症状,写好的代码能找到定义,但是输入的东西不能自动补全,或者说提示全都是这几个无用的
![单击此查看原图](//static.mysmth.net/nForum/att/Golang/4716/1304/middle)
![单击此查看原图](//static.mysmth.net/nForum/att/Golang/4716/100801/middle)
0.版本
go version go1.15.14 linux/amd64
vscode 1.60
1.不确定这个需要自己配置么
cat .bash_profile | grep go
#go env -w GO111MODULE=on
#go env -w GOPROXY=https://goproxy.cn,direct
export GOROOT="/home/xxx/go"
export GOPATH="/largeDisk/xxx/go/"
2.vscode配置
"go.useLanguageServer": true,
"[go]": {
"editor.snippetSuggestions": "none",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"gopls": {
"ui.completion.usePlaceholders": true,
"ui.completion.completionBudget": "10ms",
"ui.completion.experimentalPostfixCompletions": true,
"ui.completion.matcher": "CaseInsensitive",
},
3.gopls确实启动了
ps -ef | grep gopls
xxx 9093 31904 0 11:15 pts/0 00:00:00 grep --color=auto gopls
xxx 28138 28020 0 10:53 ? 00:00:09 /home/xxx/go/bin/gopls -mode=stdio
--
修改:lioncat7 FROM 106.120.101.*
FROM 106.120.101.*