mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 01:38:40 +02:00
plugins/lsp: Improved docs for keymaps
This commit is contained in:
parent
e229e3ad44
commit
052012d2d9
1 changed files with 6 additions and 3 deletions
|
@ -114,7 +114,7 @@ in {
|
||||||
|
|
||||||
diagnostic = mkOption {
|
diagnostic = mkOption {
|
||||||
type = with types; attrsOf (either str attrs);
|
type = with types; attrsOf (either str attrs);
|
||||||
description = "Mappings for `vim.diagnostic.<action>` functions.";
|
description = "Mappings for `vim.diagnostic.<action>` functions to be added when an LSP is attached.";
|
||||||
example = {
|
example = {
|
||||||
"<leader>k" = "goto_prev";
|
"<leader>k" = "goto_prev";
|
||||||
"<leader>j" = "goto_next";
|
"<leader>j" = "goto_next";
|
||||||
|
@ -124,7 +124,7 @@ in {
|
||||||
|
|
||||||
lspBuf = mkOption {
|
lspBuf = mkOption {
|
||||||
type = with types; attrsOf (either str attrs);
|
type = with types; attrsOf (either str attrs);
|
||||||
description = "Mappings for `vim.lsp.buf.<action>` functions.";
|
description = "Mappings for `vim.lsp.buf.<action>` functions to be added when an LSP it attached.";
|
||||||
example = {
|
example = {
|
||||||
"gd" = "definition";
|
"gd" = "definition";
|
||||||
"gD" = "references";
|
"gD" = "references";
|
||||||
|
@ -137,7 +137,10 @@ in {
|
||||||
|
|
||||||
extra = mkOption {
|
extra = mkOption {
|
||||||
type = with types; listOf helpers.keymaps.mapOptionSubmodule;
|
type = with types; listOf helpers.keymaps.mapOptionSubmodule;
|
||||||
description = "Extra keymaps to register on 'LspAttach'.";
|
description = ''
|
||||||
|
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.
|
||||||
|
'';
|
||||||
example = [
|
example = [
|
||||||
{
|
{
|
||||||
key = "<leader>lx";
|
key = "<leader>lx";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue