-
-
Notifications
You must be signed in to change notification settings - Fork 627
feat: add config option for a tree indent width #1505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add config option for a tree indent width #1505
Conversation
42fbf37
to
632e56f
Compare
632e56f
to
fdca4e7
Compare
This is looking good; everything appears functional. This is a complex piece of functionality that has experienced difficulties in the past. I will:
|
When we have two character icons the bottom is indented too far. That is a result of the assumption that glyphs are a single character, which is reasonable. This is an edge case however we should deal with it. Please:
|
This is a questionable use case and adds complication e.g. Let's remove it:
|
Test Cases
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- minimum width 1
- single character icons
This has worked well for a week in a variety of situations. Discovered existing bug #1524 which can be fixed afterwards. Will merge following changes #1505 (review) |
Nudge @mivort |
1d058df
to
53cbba4
Compare
@alex-courtis Sorry for the late update. I've updated doc and added checks for minimal indent width and marker symbol width. |
Retest da6a766
|
Nice work. Please add a comment, something like: Testing now... |
add 'indent_width' option to configure visible indent for tree nesting levels (default is 2).
712b7a3
to
05db624
Compare
Many thanks @mivort We can now customise the tree to look exactly as we want. |
Resolution: #1561 |
* 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 PR adds 'indent_width' option to configure visible indent for tree nesting levels (default is 2). Both enabled and disabled indent markers are supported.
A little context: 9a02ded seemingly removed the ability to have a compact 1-symbol width indentations (and also without indent markers it was only possible to have a fixed 2-space indents, no more, no less). This PR adds ability to have a both smaller and larger (3+) indentations.