File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,7 +277,6 @@ function M.setup(config_user)
277277
278278 manage_netrw ()
279279
280- require (" nvim-tree.notify" ).setup (config .g )
281280 require (" nvim-tree.log" ).setup (config .g )
282281
283282 if log .enabled (" config" ) then
Original file line number Diff line number Diff line change 1- local M = {}
1+ local config = require ( " nvim-tree.config " )
22
3- local config = {
4- threshold = vim .log .levels .INFO ,
5- absolute_path = true ,
6- }
3+ local M = {}
74
85local title_support
96--- @return boolean
@@ -27,8 +24,11 @@ local modes = {
2724}
2825
2926do
27+ --- @param level vim.log.levels
28+ --- @param msg string
3029 local dispatch = function (level , msg )
31- if level < config .threshold or not msg then
30+ local threshold = config .g and config .g .notify .threshold or config .d .notify .threshold
31+ if level < threshold or not msg then
3232 return
3333 end
3434
5252--- @param path string
5353--- @return string
5454function M .render_path (path )
55- if config .absolute_path then
55+ if config .g and config . g . notify . absolute_path then
5656 return path
5757 else
5858 return vim .fn .fnamemodify (path .. " /" , " :h:t" )
5959 end
6060end
6161
62- function M .setup (opts )
63- opts = opts or {}
64- config .threshold = opts .notify .threshold or vim .log .levels .INFO
65- config .absolute_path = opts .notify .absolute_path
66- end
67-
6862return M
You can’t perform that action at this time.
0 commit comments