Skip to content

Commit

Permalink
feat: added notify.timeout. Set it on a view to change the deafault t…
Browse files Browse the repository at this point in the history
…imeout
  • Loading branch information
folke committed Oct 27, 2022
1 parent 48ffb9b commit feaf5c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/noice/view/backend/notify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit feaf5c4

Please sign in to comment.