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 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 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29
Windows 1 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 3 5 4 9 2 2 3 2 12 4 5 6 1 3
Mac 2 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 4 5 10 6 5 7 6 13 9 4 4 3 1 1
Linux 1 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 5 6 4 4 7 7 7 9 8 9 3 5 5 10

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.