diff options
Diffstat (limited to 'lua/telescope/actions/init.lua')
| -rw-r--r-- | lua/telescope/actions/init.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index 402c979..4c3b42a 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -1128,6 +1128,16 @@ actions.which_key = function(prompt_bufnr, opts) table.insert(mappings, { mode = v.mode, keybind = v.keybind, name = name }) end end + elseif type(v.func) == "function" then + if not opts.only_show_current_mode or mode == v.mode then + local fname = action_utils._get_anon_function_name(v.func) + table.insert(mappings, { mode = v.mode, keybind = v.keybind, name = fname }) + utils.notify("actions.which_key", { + msg = "No name available for anonymous functions.", + level = "INFO", + once = true, + }) + end end end |
