Merge root folder and parent navigator into one.
This commit is contained in:
committed by
Kiyan Yazdani
parent
0d8b22c1e9
commit
859be0bb76
@@ -164,16 +164,10 @@ local root_folder_modifier = vim.g.lua_tree_root_folder_modifier or ':~'
|
||||
|
||||
local function update_draw_data(tree, depth, markers)
|
||||
if tree.cwd and tree.cwd ~= '/' then
|
||||
table.insert(lines, ".. (up a dir)")
|
||||
table.insert(hl, {'LuaTreeFolderName', index, 0, 13})
|
||||
index = 1
|
||||
end
|
||||
|
||||
if tree.cwd then
|
||||
local root_name = vim.fn.fnamemodify(tree.cwd, root_folder_modifier)
|
||||
local root_name = vim.fn.fnamemodify(tree.cwd, root_folder_modifier):gsub('/$', '').."/.."
|
||||
table.insert(lines, root_name)
|
||||
table.insert(hl, {'LuaTreeRootFolder', index, 0, string.len(root_name)})
|
||||
index = tree.cwd ~= '/' and 2 or 1
|
||||
index = 1
|
||||
end
|
||||
|
||||
for idx, node in ipairs(tree.entries) do
|
||||
|
||||
Reference in New Issue
Block a user