diff options
| author | Christian Chiarulli <[email protected]> | 2022-09-19 19:35:57 -0400 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2022-09-19 19:35:57 -0400 | 
| commit | 2190dba4c7e297568549743476b8f76c620ae4cc (patch) | |
| tree | 0cd266ca7ff11502d545c870137932e3b5c2137b | |
| parent | bb4a3769f9ac52cafb44de54cd5745467f0d7c15 (diff) | |
feat: a less noisy tree (#3042)
| -rw-r--r-- | lua/lvim/core/lir.lua | 2 | ||||
| -rw-r--r-- | lua/lvim/core/nvimtree.lua | 18 | 
2 files changed, 19 insertions, 1 deletions
| diff --git a/lua/lvim/core/lir.lua b/lua/lvim/core/lir.lua index 25f3820f..e65d45dd 100644 --- a/lua/lvim/core/lir.lua +++ b/lua/lvim/core/lir.lua @@ -1,6 +1,6 @@  local M = {} -local Log = require "lvim.core.log" +-- local Log = require "lvim.core.log"  M.config = function()    lvim.builtin.lir = { diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua index 372cd00f..ad326f91 100644 --- a/lua/lvim/core/nvimtree.lua +++ b/lua/lvim/core/nvimtree.lua @@ -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 | 
