fix(#1406): allow nvim-tree.renderer.icons.show.folder_arrow
* fix(#1406): allow nvim-tree.renderer.icons.show.folder_arrow when not folder * fix(#1406): allow nvim-tree.renderer.icons.show.folder_arrow when indent markers enabled * fix(builder): highlight first iteration for arrow column * fix stylua Co-authored-by: kiyan <yazdani.kiyan@protonmail.com>
This commit is contained in:
committed by
GitHub
parent
95c57e034a
commit
fd562ede63
@@ -10,7 +10,7 @@ Builder.__index = Builder
|
||||
function Builder.new(root_cwd)
|
||||
return setmetatable({
|
||||
index = 0,
|
||||
depth = nil,
|
||||
depth = 0,
|
||||
highlights = {},
|
||||
lines = {},
|
||||
markers = {},
|
||||
@@ -19,11 +19,6 @@ function Builder.new(root_cwd)
|
||||
}, Builder)
|
||||
end
|
||||
|
||||
function Builder:configure_initial_depth(show_arrows)
|
||||
self.depth = show_arrows and 2 or 0
|
||||
return self
|
||||
end
|
||||
|
||||
function Builder:configure_root_modifier(root_folder_modifier)
|
||||
self.root_folder_modifier = root_folder_modifier or ":~"
|
||||
return self
|
||||
@@ -232,7 +227,7 @@ end
|
||||
function Builder:_build_line(node, idx, num_children)
|
||||
local padding = pad.get_padding(self.depth, idx, num_children, node, self.markers)
|
||||
|
||||
if self.depth > 0 then
|
||||
if string.len(padding) > 0 then
|
||||
self:_insert_highlight("NvimTreeIndentMarker", 0, string.len(padding))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user