feat(notify): add notify.threshold (#1693)

* feat: configurable notification level

add `notify.threshold` to setup opts

* feat: configurable notification level: add threshold example doc

* feat: configurable notification level: log always comes last

Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
kylo252
2022-11-01 00:24:40 +01:00
committed by GitHub
parent ada2c6441d
commit 6ca6f99e76
19 changed files with 120 additions and 66 deletions

View File

@@ -1,4 +1,4 @@
local utils = require "nvim-tree.utils"
local notify = require "nvim-tree.notify"
local M = {}
@@ -30,7 +30,7 @@ local function dispatch(event_name, payload)
for _, handler in pairs(get_handlers(event_name)) do
local success, error = pcall(handler, payload)
if not success then
utils.notify.error("Handler for event " .. event_name .. " errored. " .. vim.inspect(error))
notify.error("Handler for event " .. event_name .. " errored. " .. vim.inspect(error))
end
end
end