Skip to content

feat(option): render description markdown#42

Merged
water-sucks merged 9 commits intomainfrom
render-option-markdown
Aug 26, 2024
Merged

feat(option): render description markdown#42
water-sucks merged 9 commits intomainfrom
render-option-markdown

Conversation

@water-sucks
Copy link
Copy Markdown
Collaborator

I've been wanting to do this for a while.

Most option descriptions have extra markup related to nixpkgs, and are written in Markdown.
I wanted to parse this markdown and render it myself using ANSI codes. That's what this PR brings in; it parses markdown using https://github.com/kivikakk/koino, and adds ANSI codes to the descriptions.

The code is crude, but it gets the job done. I'll address how to do this properly (such as adding proper indentations, fixing bugs) later. It can be disabled in the config using option.prettify=false if it does mess up with rendering some options.

This is an example of the new description rendering.
2024-08-26_16-32-57

Closes #26.

@water-sucks water-sucks merged commit a4096d6 into main Aug 26, 2024
@water-sucks water-sucks deleted the render-option-markdown branch August 26, 2024 23:59
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

Successfully merging this pull request may close these issues.

option: render descriptions, defaults, etc. in color

1 participant