diff options
Diffstat (limited to 'lua/telescope/utils.lua')
| -rw-r--r-- | lua/telescope/utils.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index d4922f2..46eee27 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -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 |
