refacto: abstract TreeExplorer in core.lua

This commit is contained in:
kiyan
2022-03-09 22:01:54 +01:00
parent d2b12d6055
commit 471afc13fe
17 changed files with 94 additions and 65 deletions

View File

@@ -1,5 +1,7 @@
local a = vim.api
local core = require "nvim-tree.core"
local M = {}
M.View = {
@@ -343,7 +345,7 @@ function M._prevent_buffer_override()
end
function M.is_root_folder_visible()
return TreeExplorer.cwd ~= "/" and not M.View.hide_root_folder
return core.get_cwd() ~= "/" and not M.View.hide_root_folder
end
local DEFAULT_CONFIG = {