ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

LSP-gopls

by sublimelsp ST4 Trending

Golang support for Sublime's LSP plugin

Labels lsp, go

Details

Installs

  • Total 18K
  • Win 5K
  • Mac 7K
  • Linux 6K
Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12
Windows 1 3 3 2 4 7 3 6 4 5 3 3 1 5 6 7 5 6 5 1 2 2 2 1 2 2 4 6 4 5 5 2 3 5 5 4 1 1 0 1 3 2 1 6 2 1
Mac 4 5 4 6 4 2 2 5 8 1 1 7 5 2 5 7 1 6 5 4 7 4 2 4 4 1 8 4 7 3 5 2 7 7 8 6 3 2 7 3 4 3 3 6 8 4
Linux 2 6 1 7 6 9 6 4 11 6 4 5 7 9 4 9 9 9 7 2 5 5 7 6 5 6 5 5 6 7 8 8 10 6 5 8 1 4 4 3 4 9 5 6 6 7

Readme

Source
raw.​githubusercontent.​com

LSP-gopls

Golang support for Sublime's LSP plugin.

Uses Go Language Server to provide validation, formatting and other features for Go & Go Mod files. See linked repository for more information.

Prerequisites

  • Go (Golang) must be installed and configured in your PATH

Optionals

LSP-gopls implements the ability for results from Go Tests to be output into a panel. In order to support this, please install Terminus

Installation

Configuration

Open configuration file using command palette with Preferences: LSP-gopls Settings command or opening it from the Sublime menu (Preferences > Package Settings > LSP > Servers > LSP-gopls).

Settings can also be overridden per project in the .sublime-project file, under the LSP-gopls key:

Error: language “jsonc” is not supported
{
    "settings": {
        "LSP": {
            "LSP-gopls": {
                "settings": {
                    "gopls.env": {
                        "GOFLAGS": "-tags=integration"
                    }
                }
            }
        }
    }
}

[!NOTE] Older versions of this package (and some external guides) use gopls as the key. Those project settings are ignored now; rename the key to LSP-gopls.

Settings

Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See the documentation for all available settings.