mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
feat: a less noisy tree (#3042)
This commit is contained in:
parent
bb4a3769f9
commit
2190dba4c7
2 changed files with 19 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
local M = {}
|
||||
|
||||
local Log = require "lvim.core.log"
|
||||
-- local Log = require "lvim.core.log"
|
||||
|
||||
M.config = function()
|
||||
lvim.builtin.lir = {
|
||||
|
|
|
@ -147,6 +147,24 @@ function M.setup()
|
|||
return
|
||||
end
|
||||
|
||||
local status_ok_1, utils = pcall(require, "nvim-tree.utils")
|
||||
if not status_ok_1 then
|
||||
return
|
||||
end
|
||||
|
||||
local function notify_level()
|
||||
return function(msg)
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_echo({ { msg, "WarningMsg" } }, false, {})
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
utils.notify.warn = notify_level(vim.log.levels.WARN)
|
||||
utils.notify.error = notify_level(vim.log.levels.ERROR)
|
||||
utils.notify.info = notify_level(vim.log.levels.INFO)
|
||||
utils.notify.debug = notify_level(vim.log.levels.DEBUG)
|
||||
|
||||
if lvim.builtin.nvimtree._setup_called then
|
||||
Log:debug "ignoring repeated setup call for nvim-tree, see kyazdani42/nvim-tree.lua#1308"
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue