zoukankan      html  css  js  c++  java
  • 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 
    
  • 相关阅读:
    4.Docker Compose 部署 Nexus
    3.Docker Compose 部署 GitLab
    2.Docker Compose 部署应用程序
    1.Docker Compose
    6.Dockerfile 指令
    5.Dockerfile 定制镜像
    4.Docker 操作容器
    3.Docker 操作镜像
    2.Ubuntu安装 Docker
    windows快捷键
  • 原文地址:https://www.cnblogs.com/enumx/p/12317619.html
Copyright © 2011-2022 走看看