lsp.keymaps
Keymaps to register when a language server is attached.
Type: list of (submodule)
Default:
[ ]
Example:
[
{
key = "gd";
lspBufAction = "definition";
}
{
key = "gD";
lspBufAction = "references";
}
{
key = "gt";
lspBufAction = "type_definition";
}
{
key = "gi";
lspBufAction = "implementation";
}
{
key = "K";
lspBufAction = "hover";
}
{
action = lib.nixvim.mkRaw "function() vim.diagnostic.jump({ count=-1, float=true }) end";
key = "<leader>k";
}
{
action = lib.nixvim.mkRaw "function() vim.diagnostic.jump({ count=1, float=true }) end";
key = "<leader>j";
}
{
action = "<CMD>LspStop<Enter>";
key = "<leader>lx";
}
{
action = "<CMD>LspStart<Enter>";
key = "<leader>ls";
}
{
action = "<CMD>LspRestart<Enter>";
key = "<leader>lr";
}
{
action = lib.nixvim.mkRaw "require('telescope.builtin').lsp_definitions";
key = "gd";
}
{
action = "<CMD>Lspsaga hover_doc<Enter>";
key = "K";
}
]
Declared by:
lsp.keymaps.*.action
The action to execute.
Type: string or raw lua code
Example:
"<CMD>LspRestart<Enter>"
Declared by:
lsp.keymaps.*.key
The key to map.
Type: string
Example:
"<C-m>"
Declared by:
lsp.keymaps.*.lspBufAction
LSP buffer action to use for action
.
If non-null, the keymap’s action
will be defined as vim.lsp.buf.<action>
.
See :h lsp-buf
Type: null or string
Default:
null
Example:
"hover"
Declared by:
lsp.keymaps.*.mode
One or several modes.
Use the short-names ("n"
, "v"
, …).
See :h map-modes
to learn more.
Type: one of or non-empty list of “”, “n”, “!”, “i”, “c”, “v”, “x”, “s”, “o”, “t”, “l”, “!a”, “ia”, “ca”
Default:
""
Example:
[
"n"
"v"
]
Declared by: