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

Support loading a TOML configuration #229

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Support loading a TOML configuration #229

merged 1 commit into from
Mar 26, 2024

Conversation

ulyssa
Copy link
Owner

@ulyssa ulyssa commented Mar 26, 2024

Between testing out different configurations and updating the docs for the upcoming v0.0.9 release, I've been feeling like iamb's kind of pushing the comfort zone for using JSON as a configuration language. Specifically, the inability to comment out lines while trying things out, and the way per-profile configurations can end up deeply nested. TOML's sections seem well-suited for avoiding deep nesting, and its syntax is small and easy to learn. The only pain points I can think of is trying to express multiple window splits in the layout.tabs value, and the fact that default_profile lies outside any section, and therefore must always be placed first in the file.

I've written this so that it first checks for and loads a config.toml file, and then checks for config.json. I'm going to update the manual pages and site to talk about the TOML config, since the examples should be easier to understand and read that way, but I plan to keep the config.json support indefinitely. (serde should keep that straightforward and not a maintenance burden since JSON and TOML have similar types and structures.)

@ulyssa ulyssa merged commit ed1b88c into main Mar 26, 2024
4 checks passed
@ulyssa ulyssa deleted the load-toml-config branch March 26, 2024 04:30
@ulyssa ulyssa added this to the v0.0.9 milestone Mar 29, 2024
@ulyssa ulyssa mentioned this pull request Mar 29, 2024
This was referenced Apr 3, 2024
octvs added a commit to octvs/deepl that referenced this pull request Aug 25, 2024
- Follow ulyssa/iamb [#229]

[#229]: (ulyssa/iamb#229)
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.

1 participant