diff --git a/README.md b/README.md index ee8248d..1620d3c 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,19 @@ to users and mimic the default behaviour of their normal mode equivalents. | `` | Undo changes. | | `` | Redo undone changes. | +To change existing mappings or add new ones, the value needed to be passed in the +mappings field is a Lua function. Here is an example of how to change ``'s +behaviour from clearing the line to closing the popup: + +```lua +-- other setup code... + +[''] = function() + vim.api.nvim_input('') +end + +-- other setup code... +``` ## Media diff --git a/doc/renamer.txt b/doc/renamer.txt index f8b6214..641acb6 100644 --- a/doc/renamer.txt +++ b/doc/renamer.txt @@ -204,6 +204,20 @@ described in |renamer.setup|: See `:help CTRL-R` +To change existing mappings or add new ones, the value needed to be passed in the +mappings field is a Lua function. Here is an example of how to change ``'s +behaviour from clearing the line to closing the popup: +> + -- other setup code... + + [''] = function() + vim.api.nvim_input('') + end + + -- other setup code... +< + + =============================================================================== *renamer.highlights*