feat(renderer): add renderer.indent_width (#1505)

* feat: add config option for a tree indent width

add 'indent_width' option to configure visible indent for tree nesting
levels (default is 2).

* add 'bottom' char for a corner extension

* apply stylua formatting

* provide value constraints in documentation

* limit minimal indent width

* make marker symbols have one utf8 char width

* match stylua formatting

* add the commentary regarding utf-8 first symbol match
This commit is contained in:
Mivort
2022-08-30 02:44:30 +03:00
committed by GitHub
parent 757951ba6b
commit e8bf3d778a
4 changed files with 48 additions and 20 deletions

View File

@@ -258,9 +258,9 @@ function Builder:_build_line(node, idx, num_children)
self.index = self.index + 1
if node.open then
self.depth = self.depth + 2
self.depth = self.depth + 1
self:build(node)
self.depth = self.depth - 2
self.depth = self.depth - 1
end
end