plugins.lsp.keymaps.extra

Extra keymaps to register when an LSP is attached. This can be used to customise LSP behaviour, for example with “telescope” or the “Lspsaga” plugin, as seen in the examples.

Type: list of (submodule)

Default: [ ]

Example:

[
  {
    action = "<CMD>LspStop<Enter>";
    key = "<leader>lx";
  }
  {
    action = "<CMD>LspStart<Enter>";
    key = "<leader>ls";
  }
  {
    action = "<CMD>LspRestart<Enter>";
    key = "<leader>lr";
  }
  {
    action = {
      __raw = "require('telescope.builtin').lsp_definitions";
    };
    key = "gd";
  }
  {
    action = "<CMD>Lspsaga hover_doc<Enter>";
    key = "K";
  }
]

Declared by:

plugins.lsp.keymaps.extra.*.action

The action to execute.

Type: string or raw lua code

Declared by:

plugins.lsp.keymaps.extra.*.key

The key to map.

Type: string

Example: "<C-m>"

Declared by:

plugins.lsp.keymaps.extra.*.mode

One or several modes. Use the short-names ("n", "v", …). See :h map-modes to learn more.

Type: one of “c”, “i”, “!”, “l”, “n”, “”, “o”, “s”, “t”, “v”, “x” or list of (one of “c”, “i”, “!”, “l”, “n”, “”, “o”, “s”, “t”, “v”, “x”)

Default: ""

Example:

[
  "n"
  "v"
]

Declared by: