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

More control over indentation for cli_bullets() #673

Closed
wurli opened this issue Feb 28, 2024 · 2 comments
Closed

More control over indentation for cli_bullets() #673

wurli opened this issue Feb 28, 2024 · 2 comments

Comments

@wurli
Copy link

wurli commented Feb 28, 2024

cli_bullets() lets you use " " for an indented item, without a symbol:

cli::cli_bullets(c(
  " " = "indent",
  "*" = "bullet"
))
#>   indent
#> • bullet

It would be nice to be able to indent by more than 2 spaces, or to indent bullets whilst retaining the symbol. Perhaps a nice API would be to control this by prepending spaces to the existing bullet names:

cli::cli_bullets(c(
  " "   = "indent",
  "*"   = "bullet",
  " *"  = "indented bullet",
  "  "  = "double indent",
  "  *" = "double indented bullet
))
#>   indent
#> • bullet
#>   • indented bullet
#>     double indent
#>     • double indented bullet
@gaborcsardi
Copy link
Member

I think you can customize this with themes, see the examples of the default here:

cli/R/themes.R

Line 133 in 5f033eb

".bullets .bullet-empty" = list(),

@gaborcsardi
Copy link
Member

Please comment if you have more questions.

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