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

Allow user styling of ANSI writer output #10150

Open
silby opened this issue Sep 3, 2024 · 0 comments
Open

Allow user styling of ANSI writer output #10150

silby opened this issue Sep 3, 2024 · 0 comments

Comments

@silby
Copy link
Contributor

silby commented Sep 3, 2024

The ANSI writer, of necessity, has a bunch of hardcoded aesthetic decisions, as discussed in the review history of #9565. There should be an API to provide a stylesheet to the ANSI writer and a user interface for constructing such stylesheets/overriding parts of the default, using e.g. the defaults file.

The stylesheet could look something like:

data Stylesheet = Stylesheet {
    styleCode :: Doc Text -> Doc Text,
    styleBullet :: Text,
    styleBlockQuoteBorder :: Text,
    styleH1 :: Doc Text -> Doc Text,
    -- and so on
}

The user interface could look something like:

ansi_style:
 code:
   bg: white
   fg: red
 h1:
   weight: bold
   align: center
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant