想知道是否有人得到 find all references
使用 Golang 为 VS Code 工作。
使用 VS 代码版本:1.23.1
.
似乎它具有所需的所有必要扩展,例如(go-langserver,guru)。尽管如此,find all references
不返回任何结果。
最佳答案
我对带有模块的项目(在 GOPATH 之外)有同样的问题。guru
不支持模块。
(见:https://github.com/golang/go/issues/24661)
安装后gopls
并通过设置 go.useLanguageServer
在 VS Code 中启用它find all references
确实又工作了。
(VS Code Go 扩展默认不使用 gopls
。)
见:https://github.com/golang/vscode-go#language-server
关于go - 在 VS Code (Golang) 中查找符号的所有引用返回 0 结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58668035/