Support loading a TOML configuration #310

Closed
opened 2025-10-14 15:45:42 -06:00 by navan · 0 comments
Owner

Originally created by @ulyssa on 3/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.)

*Originally created by @ulyssa on 3/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.)
navan closed this issue 2025-10-14 15:45:43 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/iamb#310
No description provided.