lsp.servers.gopls

The gopls language server.

Type: submodule

Default: { }

Declared by:

lsp.servers.gopls.enable

Whether to enable gopls.

Type: boolean

Default: false

Example: true

Declared by:

lsp.servers.gopls.package

The gopls package to use.

Alternatively, gopls should be installed on your $PATH.

Type: null or package

Default: pkgs.gopls

Declared by:

lsp.servers.gopls.activate

Whether to call vim.lsp.enable() for gopls.

Type: boolean

Default: true, unless the server’s name is *

Example: false

Declared by:

lsp.servers.gopls.name

The name to use for gopls. Supplied to functions like vim.lsp.enable().

Type: string or raw lua code

Default: "gopls"

Declared by:

lsp.servers.gopls.settings

Configurations for gopls.

Type: attribute set of anything

Default: { }

Example:

{
  cmd = [
    "clangd"
    "--background-index"
  ];
  filetypes = [
    "c"
    "cpp"
  ];
  root_markers = [
    "compile_commands.json"
    "compile_flags.txt"
  ];
}

Declared by: