Gopls: Index of features

This page provides an index of all supported features of gopls that are accessible through the language server protocol (LSP). It is intended for:

  • users of gopls learning its capabilities so that they get the most out of their editor;
  • editor maintainers adding or improving Go support in an LSP-capable editor; and
  • contributors to gopls trying to understand how it works.

In an ideal world, Go users would not need to know that gopls or even LSP exists, as their LSP-enabled editors would implement every facet of the protocol and expose each feature in a natural and discoverable way. In reality, editors vary widely in their support for LSP, so unfortunately these documents necessarily involve many details of the protocol.

We also list settings that affect each feature.

Most features are illustrated with reference to VS Code, but we will briefly mention whether each feature is supported in other popular clients, and if so, how to find it. We welcome contributions, edits, and updates from users of any editor.

Contributors should update this documentation when making significant changes to existing features or when adding new ones.

You can find this page from within your editor by executing the gopls.doc.features code action, which opens it in a web browser. In VS Code, you can find it on the Quick fix menu.