Files
neovim/runtime/doc
shadmansaleh b411f436d3 feat(api): add support for lua function & description in keymap
Behavioral changes:

1. Added support for lua function in keymaps in
--------------------------------------------
- nvim_set_keymap
  Can set lua function as keymap rhs like following:
```lua
vim.api.nvim_{buf_}set_keymap('n', '<leader>lr', '', {callback = vim.lsp.buf.references})
```
  Note: lua function can only be set from lua . If api function being
  called from viml or over rpc this option isn't available.
- nvim_{buf_}get_keymap
  When called from lua, lua function is returned is `callback` key .
  But in other cases callback contains number of the function ref.
- :umap, nvim_del_keymap & nvim_buf_del_keymap clears lua keymaps correctly.
- :map commands for displaing rhs .
   For lua keymaps rhs is displayed as <Lua function ref_no>
   Note: lua keymap cannot be set through viml command / functions.
- mapargs()
  When dict is false it returns string in `<Lua function ref_no>`
  format (same format as :map commands).
  When dict is true it returns ref_no number in `callback` key.
- mapcheck()
  returns string in `<Lua function ref_no>` format (same format as :map commands).

2. Added support for keymap description
---------------------------------------
- nvim_{buf_}set_keymap: added `desc` option in opts table .
 ```lua
vim.api.nvim_set_keymap('n', '<leader>w', '<cmd>w<cr>', {desc='Save current file'})
```
- nvim_{buf_}get_keymap: contains `desc` in returned list.
- commands like `:nmap <leader>w` will show description in a new line below rhs.
- `maparg()` return dict contains `desc`.
2022-01-01 00:26:58 +06:00
..
2021-09-10 08:48:27 +02:00
2021-10-16 18:03:51 +02:00
2021-12-06 13:55:38 +01:00
2021-09-23 06:59:30 -07:00
2021-12-28 18:15:16 +01:00
2021-09-08 07:24:12 -07:00
2021-12-28 18:15:16 +01:00
2018-10-29 09:32:29 +01:00
2021-09-10 08:48:27 +02:00
2021-09-10 08:48:27 +02:00
2018-10-29 10:01:44 +01:00
2021-09-08 07:24:12 -07:00
2018-10-29 09:55:07 +01:00
2021-12-16 21:46:13 +01:00
2018-10-29 09:55:07 +01:00
2021-11-17 10:02:59 +01:00
2021-09-09 00:37:59 -07:00
2021-12-28 18:15:16 +01:00
2021-12-28 18:15:16 +01:00
2018-08-25 15:25:49 +02:00
2021-04-28 21:29:57 -04:00
2021-05-01 22:29:03 -04:00
2021-09-10 08:48:27 +02:00
2019-03-26 19:55:33 +01:00
2021-10-16 18:03:51 +02:00
2018-10-29 09:55:07 +01:00
2021-11-27 11:10:48 -05:00
2021-09-13 06:05:27 -07:00
2018-10-29 09:55:07 +01:00
2018-10-29 09:55:07 +01:00
2015-08-15 15:25:30 -03:00
2021-11-17 10:02:59 +01:00
2021-10-05 14:12:16 +02:00
2021-09-10 06:59:17 -07:00
2021-12-06 13:55:38 +01:00
2021-04-29 21:08:09 -04:00
2019-03-26 19:55:33 +01:00
2021-09-10 08:48:27 +02:00
2019-08-02 16:20:22 +02:00
2021-09-08 07:24:12 -07:00
2021-04-27 09:21:35 -04:00
2021-04-27 09:21:34 -04:00
2021-12-28 18:15:16 +01:00
2021-04-27 09:21:31 -04:00
2021-05-01 22:29:03 -04:00
2021-04-27 09:21:30 -04:00
2021-05-02 13:00:38 -04:00
2021-05-01 23:19:57 -04:00
2021-05-02 10:23:35 -04:00
2021-09-10 06:59:17 -07:00
2019-08-02 16:20:22 +02:00
2021-04-27 21:47:42 -04:00
2021-09-08 07:24:12 -07:00
2021-09-08 07:24:12 -07:00
2021-04-28 21:29:56 -04:00
2021-05-01 22:29:02 -04:00
2021-05-02 12:53:49 -04:00
2021-11-22 10:53:57 +01:00
2021-05-01 22:29:03 -04:00
2021-04-27 09:21:33 -04:00
2018-10-29 10:01:44 +01:00
2021-04-29 09:27:19 -04:00
2018-10-29 10:01:44 +01:00
2018-10-29 10:01:44 +01:00
2021-04-29 20:42:16 -04:00
2021-04-29 20:42:16 -04:00
2018-10-29 10:01:44 +01:00
2021-04-29 20:42:16 -04:00
2019-03-26 19:55:33 +01:00
2021-04-27 09:21:34 -04:00
2021-04-29 20:42:16 -04:00
2021-12-16 21:46:13 +01:00
2021-05-01 23:19:57 -04:00
2021-11-22 10:53:57 +01:00