* feat: Remove nvim-notify auto-detection * feat: Remove nvim-notify auto-detection: stylua --------- Co-authored-by: ghostbuster91 <ghostbuster91@users.noreply.github.com> Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
committed by
GitHub
parent
0a144ba50a
commit
68f485b454
@@ -13,19 +13,13 @@ local modes = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
local has_notify, notify_plugin = pcall(require, "notify")
|
|
||||||
|
|
||||||
local dispatch = function(level, msg)
|
local dispatch = function(level, msg)
|
||||||
if level < config.threshold then
|
if level < config.threshold then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
if has_notify and notify_plugin then
|
vim.notify(msg, level, { title = "NvimTree" })
|
||||||
notify_plugin(msg, level, { title = "NvimTree" })
|
|
||||||
else
|
|
||||||
vim.notify(string.format("[NvimTree] %s", vim.inspect(msg)), level)
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user