fix(actions): set function name for generate.which_key (#3044)

Using anonymous function is throwing warning "No name available for
anonymous functions" when `action_generate.which_key` is used as shown
in the docs.

(cherry picked from commit 5a701e9990)
This commit is contained in:
James Trew
2024-04-09 21:26:51 -04:00
committed by Simon Hauser
parent 9ab6aa2a7c
commit b9ea3a2d5f

View File

@@ -53,9 +53,10 @@ local action_generate = {}
---@field border_hl string: winhl of "Normal" for keymap borders (default: "TelescopePromptBorder")
---@field winblend number: pseudo-transparency of keymap hints floating window
action_generate.which_key = function(opts)
return function(prompt_bufnr)
local which_key = function(prompt_bufnr)
actions.which_key(prompt_bufnr, opts)
end
return which_key
end
action_generate.refine = function(prompt_bufnr, opts)