From feaf5c43c22a14f5405e7dabd0112974589a6998 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 27 Oct 2022 14:49:31 +0200 Subject: [PATCH] feat: added notify.timeout. Set it on a view to change the deafault timeout --- lua/noice/view/backend/notify.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/noice/view/backend/notify.lua b/lua/noice/view/backend/notify.lua index cdaf56e..fdb173f 100644 --- a/lua/noice/view/backend/notify.lua +++ b/lua/noice/view/backend/notify.lua @@ -9,6 +9,8 @@ local Manager = require("noice.message.manager") ---@field level? string|number Message log level ---@field merge boolean Merge messages into one Notification or create separate notifications ---@field replace boolean Replace existing notification or create a new one +---@field render? notify.RenderFun +---@field timeout? integer local defaults = { title = "Notification", merge = false, @@ -127,6 +129,7 @@ function NotifyView:_notify(msg) local opts = { title = msg.title or self._opts.title, + timeout = self._opts.timeout, replace = self._opts.replace and self.notif[instance], keep = function() return Util.is_blocking()