LSP-gopls
Golang support for Sublime's LSP plugin
Installations minus removals
Upgrades
- 16,957 installs
- 70 stars
Links
Versions
1.22.3
(ST4070+)
·
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
- Install LSP and LSP-gopls from Package Control. Optionally install Sublime Gomod for gomod support.
- Restart Sublime.
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:
{
"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.