neovim/runtime
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
..
autoload chore: fix typos (#16506) 2021-12-28 18:15:16 +01:00
colors vim-patch:4f4d51a942cc 2021-05-01 14:22:52 -04:00
compiler vim-patch:6c391a74fe90 (#15654) 2021-09-13 16:33:41 +02:00
doc feat(api): add support for lua function & description in keymap 2022-01-01 00:26:58 +06:00
ftplugin vim-patch:partial fa3b72348d88 (#16780) 2021-12-26 11:03:25 +01:00
indent vim-patch:partial fa3b72348d88 (#16780) 2021-12-26 11:03:25 +01:00
keymap vim-patch:6c391a74fe90 (#15654) 2021-09-13 16:33:41 +02:00
lua chore: fix typos (#16506) 2021-12-28 18:15:16 +01:00
macros vim-patch:4072ba571bab 2021-05-01 22:29:03 -04:00
pack/dist/opt vim-patch:partial fa3b72348d88 (#16780) 2021-12-26 11:03:25 +01:00
plugin vim-patch:519cc559b08b (#16340) 2021-11-17 10:02:59 +01:00
print
queries/c treesitter: Update to 0.19.3 2021-03-09 19:21:26 +01:00
spell vim-patch:8.2.0038: spell suggestions insufficiently tested 2021-06-12 13:06:49 -04:00
syntax vim-patch:partial fa3b72348d88 (#16780) 2021-12-26 11:03:25 +01:00
tools vim-patch:6304be625ce4 (#16450) 2021-11-27 19:39:42 +01:00
tutor fix(tutor): formatting, layout #15098 2021-08-30 05:27:35 -07:00
bugreport.vim
CMakeLists.txt vim-patch:8.2.3676: unused runtime file (#16441) 2021-11-26 17:16:11 +01:00
delmenu.vim vim-patch:8.1.2416: loading menus sets v:errmsg 2021-04-11 17:05:42 -04:00
filetype.vim vim-patch:a4d131d11052 (#16811) 2021-12-28 12:24:44 +01:00
ftoff.vim
ftplugin.vim feat(runtime): Allow lua to be used in ftplugin 2021-06-11 01:01:02 +06:00
ftplugof.vim
indent.vim feat(runtime): Allow lua to be used in indent 2021-06-11 01:01:02 +06:00
indoff.vim
macmap.vim
makemenu.vim vim-patch:95a9dd1efc5a 2021-04-27 09:21:32 -04:00
menu.vim vim-patch:65e0d77a66b7 2021-04-28 21:57:50 -04:00
mswin.vim
nvim.appdata.xml fix(runtime): add missing release metadata 2021-12-31 19:04:37 +01:00
nvim.desktop vim-patch:23515b4ef758 2021-05-01 22:29:03 -04:00
nvim.png
optwin.vim vim-patch:partial:0e6adf8a29d5 2021-12-25 11:31:54 +08:00
scripts.vim vim-patch:8.2.3686: filetype detection often mixes up Forth and F# 2021-11-27 19:21:57 +01:00
synmenu.vim vim-patch:4466ad6baa22 2021-05-01 22:29:02 -04:00