refacto: abstract TreeExplorer in core.lua
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user