keymaps

List of keymaps to set. Refer to nvim’s documentation on vim.keymap.set for usage and option documentation. Also see lib.vim.mkKeymap.

Type: list of ((function that evaluates to a(n) (attribute set)) or (submodule))

Default: [ ]

Example:

[
  # syntactic sugar for setting a (non recursive) normal-mode keymap.
  (vim.nnoremap "<leader>p" (rawLua "function() print('hello world') end"))
  # note that you can also (but do not have to) pass additional keymap options
  (vim.nnoremap 'j'  "v:count == 0 ? 'gj' : 'j'"  "Move down"  { expr = true; silent = true; })
  # you can also just use raw attrsets if you prefer
  {
    mode = "n";
    lhs = "<leader>r";
    rhs = rawLua "function() print('hello world 2') end";
    opts = {desc = "print another cool message";};
  }
]

Declared by: