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

Lists formatting #225

Open
cpkio opened this issue Apr 12, 2023 · 1 comment
Open

Lists formatting #225

cpkio opened this issue Apr 12, 2023 · 1 comment
Labels
question Further information is requested

Comments

@cpkio
Copy link

cpkio commented Apr 12, 2023

Hi, thanks for your great library. I started using slides and noticed this lists formatting. Can they be formatted nicer way via NewTermRenderer call?

2023-04-12_213800

@bashbunni
Copy link
Member

@muesli please let me know if there's a better way here, but I know you can adjust the style config for the list items as follows:

	config := glamour.DarkStyleConfig
	config.Item = ansi.StylePrimitive{
		BlockPrefix: "      • ",
	}
	renderer, err := glamour.NewTermRenderer(
		glamour.WithStyles(config),
		glamour.WithWordWrap(width),
	)

Then again, that takes away the option for auto-detecting the terminal theme your user might prefer (light vs dark)

@bashbunni bashbunni added the question Further information is requested label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants