Skip to content
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

New option to control indenting of list markers #119

Open
Vampire opened this issue Mar 12, 2024 · 1 comment
Open

New option to control indenting of list markers #119

Vampire opened this issue Mar 12, 2024 · 1 comment

Comments

@Vampire
Copy link

Vampire commented Mar 12, 2024

There should be an option to toggle indenting of list markers.
Either a boolean to switch it between off and 1 per level from level 2 on (current default),
or a numeric to control how many per level with default 1 like now.

@mojavelinux
Copy link
Member

If we decide on the boolean option, I propose the following name:

  • cli: --[no-]indent-nested-list-markers
  • api: :indent_nested_list_markers (boolean)

In this case, the list item marker is indented 1 space for each level of nesting.

If we decide on the numeric multiplier option, I propose the following name:

  • cli: --nested-list-marker-indent=[multiplier]
  • api: :nested_list_marker_indent (integer)

In this case, the each list item marker is indented by this multiplier of the level of nesting (2 is 2 spaces x level of nesting).

The "nested" name segment may be too pedantic and I'd be open to dropping it. What I worry is that someone might think the top-level marker is indented too, which it won't be (and shouldn't be). I'm on the fence about this.

The default would need to match the current behavior for backwards compatibility (though we may have wished there to be no indent by default...but what's done is done).

I'm leaning towards the multiplier option for two reasons. First, I think the option is a bit easier to read. It reads as "nested list marker indent" which is reasonably self documenting. Second, I think as soon as we offer the ability to toggle it, someone will want to control how much indentation is used. So we end up right back here, only now having to come up with a second option. It just seems like one of those times when it make sense to take it all the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants