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.
This commit is contained in:
James Trew
2024-04-09 21:26:51 -04:00
committed by GitHub
parent d26b666b45
commit 5a701e9990

View File

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