feat: show assigned function in actions.which_key (#1871)
This commit is contained in:
@@ -477,14 +477,15 @@ end)
|
||||
|
||||
--- Telescope Wrapper around vim.notify
|
||||
---@param funname string: name of the function that will be
|
||||
---@param opts table: opts.level string, opts.msg string
|
||||
---@param opts table: opts.level string, opts.msg string, opts.once bool
|
||||
utils.notify = function(funname, opts)
|
||||
opts.once = vim.F.if_nil(opts.once, false)
|
||||
local level = vim.log.levels[opts.level]
|
||||
if not level then
|
||||
error("Invalid error level", 2)
|
||||
end
|
||||
|
||||
vim.notify(string.format("[telescope.%s]: %s", funname, opts.msg), level, {
|
||||
local notify_fn = opts.once and vim.notify_once or vim.notify
|
||||
notify_fn(string.format("[telescope.%s]: %s", funname, opts.msg), level, {
|
||||
title = "telescope.nvim",
|
||||
})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user