Skip to content

feat/pager: syntax-rendering in pager #804

@dextermallo

Description

Description

Hi Charm team, love the ideas of gum and other handy utilities!
I have an idea for the command pager: syntax-highlight when outputting the contents. (which is one of my use cases)

Describe the solution you'd like

  1. I am unsure whether it is applicable to introduce other packages like alecthomas/chroma to do the full syntax highlight on every type of file, so I use glamour to do it first to see if the idea is applicable.
  2. Followed by 1, it only supports with --syntax-highlight=markdown now.
  • Add a flag --syntax-highlight=<language> under /pager/options.go

Example

demo

I am quite new to Go but would love to do on other languages as well :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions