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

@@ -213,6 +213,7 @@ Subsequent calls to setup will replace the previous configuration.
full_name = false,
highlight_opened_files = "none",
root_folder_modifier = ":~",
indent_width = 2,
indent_markers = {
enable = false,
inline_arrows = true,
@@ -220,6 +221,7 @@ Subsequent calls to setup will replace the previous configuration.
corner = "└",
edge = "│",
item = "│",
bottom = "─",
none = " ",
},
},
@@ -709,6 +711,10 @@ UI rendering setup
available options.
Type: `string`, Default: `":~"`
*nvim-tree.renderer.indent_width*
Number of spaces for an each tree nesting level. Minimum 1.
Type: `number`, Default: `2`
*nvim-tree.renderer.indent_markers*
Configuration options for tree indent markers.
@@ -722,8 +728,8 @@ UI rendering setup
Type: `boolean`, Default: `true`
*nvim-tree.renderer.indent_markers.icons*
Icons shown before the file/directory.
Type: `table`, Default: `{ corner = "└", edge = "│", item = "│", none = " ", }`
Icons shown before the file/directory. Length 1.
Type: `table`, Default: `{ corner = "└", edge = "│", item = "│", bottom = "─", none = " ", }`
*nvim-tree.renderer.icons*
Configuration options for icons.