/tools

[mirror] Go Tools

Primary LanguageGoBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

gopls

I have ported some features such as references, rename, workspace symbol, implementation of bingo to gopls

Install

gopls is a go module project, so you need install Go 1.12 or above, to install the gopls, please run

git clone -b bingo https://github.com/saibing/tools.git
cd tools/cmd/gopls
go install

Language Client

{
    "go.useLanguageServer": true,
    "go.alternateTools": {
        "go-langserver": "gopls"
    },
    "go.languageServerExperimentalFeatures": {
        "format": true,
        "autoComplete": true
    },
    "editor.codeActionsOnSave": {
        "source.organizeImports": true
    }
}
{
  "languageserver": {
    "golang": {
      "command": "gopls",
      "args": [],
      "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
      "filetypes": ["go"]
    }
  }
}

Google offical gopls wiki

https://github.com/golang/go/wiki/gopls