could not find 'gopls


安装go tools

安装以上后用vim打开go代码,使用函数跳转时会出现:

E718: Funcref required
vim-go: could not find 'gopls'. Run :GoInstallBinaries to fix it

或者说guru等不存在的错误,这时按照提示在vim中执行GoInstallBinaries会出现:

Error downloading github.com/zmb3/gogetdoc
Error downloading github.com/stamblerre/gocode
...
 
下载不成功,原因是这里网站连不上,需要找资源下载来手动安装。
比较重要的模块是:guru/gopls 在使用时主要是提示这两个模块,因此先安装。
guru

1、建立路径:mkdir -p $GOPATH/github.com/Go-zh/

2、 在$GOPATH/github.com/Go-zh/ 目录下执行git clone https://github.com/Go-zh/tools.git
3、执行安装:

go install github.com/Go-zh/tools/cmd/guru
#以下模块也包含了,顺带一起安装
go install github.com/Go-zh/tools/cmd/goimports
go install github.com/Go-zh/tools/cmd/gorename


gopls

执行安装:

go install github.com/Go-zh/tools/cmd/gopls
---------------------  
作者:yefengzhichen  
来源:CSDN  
原文:https://blog.csdn.net/yefengzhichen/article/details/90050921  
版权声明:本文为博主原创文章,转载请附上博文链接!


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM