Skip to content

Commit c5c09eb

Browse files
committed
Remove nvim-notify auto detection
1 parent 1e8f057 commit c5c09eb

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

lua/nvim-tree/notify.lua

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
local M = {}
22

3-
local fallback_handler = function(msg, level, opts)
3+
local default_handler = function(msg, level, opts)
44
vim.notify(string.format("[%s] %s", opts.title, vim.inspect(msg)), level)
55
end
66

77
local config = {
88
threshold = vim.log.levels.INFO,
9-
handler = fallback_handler,
9+
handler = default_handler,
1010
}
1111

1212
local modes = {
@@ -35,22 +35,11 @@ do
3535
end
3636
end
3737

38-
local create_default_handler = function()
39-
local has_notify, notify_plugin = pcall(require, "notify")
40-
if has_notify and notify_plugin then
41-
return notify_plugin
42-
else
43-
return fallback_handler
44-
end
45-
end
46-
4738
function M.setup(opts)
4839
opts = opts or {}
4940
config.threshold = opts.notify.threshold or vim.log.levels.INFO
5041
if type(opts.notify.handler) == "function" then
5142
config.handler = opts.notify.handler
52-
else
53-
config.handler = create_default_handler()
5443
end
5544
end
5645

0 commit comments

Comments
 (0)