You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So currently the padding is being applied to all list levels. It's just a uniform padding, i.e. 4 across all items. You want level dependent padding support?
## Details
Request: #349
This allows both `bullet.left_pad` & `bullet.right_pad` to be a `function`
that returns an `integer` in addition to the basic `integer` value.
The input is the same `ctx` object that is provided to the `icon`
`function` and currently contains the following fields:
- `level`: how deeply nested the current list item is
- `index`: the index of the list item within its bottom most list
- `value`: the text value of the marker node, useful for ordered lists
Unrelated change: `Base:padding_text()` -> `Base:pad()`
I'm not sure if I fully understood what you meant but this change lets left_pad & right_pad be functions with access to information like the level, as well as the index and the marker value.
From your example I believe this is what you want:
Neovim version (nvim -v)
0.10.4
Neovim distribution
N/A
Description
bullet = { left_pad = 4 }
applies padding to only first level not other levels
for exact calculation I want,
(left_pad + 1 + right_pad)*(n-1) + left_pad
for level nif I configure left_pad = 4, right_pad = 0,
level 1 - indentation of 4
level 2 - indentation of 9
level 3 - indentation of 14 ...
Is there a way we can add this calculation as a function inside bullet configuration and make it work like I intend to?
The text was updated successfully, but these errors were encountered: