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

Add option to load config from file #13

Closed
mszostok opened this issue Jul 30, 2022 · 3 comments
Closed

Add option to load config from file #13

mszostok opened this issue Jul 30, 2022 · 3 comments
Assignees
Labels
area/customization Enables default behavior customization
Milestone

Comments

@mszostok
Copy link
Owner

mszostok commented Jul 30, 2022

Description

Add option to load config from file. Support both YAML and JSON files (detects dynamically). Configure options:

  1. Enable loading style from environment variable via version.WithPrettyStyleFromEnv("ENV_NAME_FOR_FILE_PATH"),
  2. Load a style file directly using Go function, version.WithPrettyStyleFile.

Reasons

It enables dynamic styling without the need to know/use Go.

@mszostok mszostok added the area/customization Enables default behavior customization label Jul 30, 2022
@Kamsiy
Copy link
Contributor

Kamsiy commented Dec 18, 2022

is anyone working on this? is this available to pick up?

@mszostok
Copy link
Owner Author

Hi, yes,

IMO we can also support only YAML in the first stage. Later we can "port" NewYAMLOrJSONDecoder :)

for loading the style configuration, you can take a look on https://github.com/charmbracelet/glamour#styles as they do exactly this :)

@Kamsiy
Copy link
Contributor

Kamsiy commented Jan 14, 2023

sounds good, I'll take a look, sorry for the late responses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/customization Enables default behavior customization
Projects
Development

No branches or pull requests

2 participants