Skip to content

Rework settings/config#142

Open
ur-fault wants to merge 56 commits into
masterfrom
rework-settings
Open

Rework settings/config#142
ur-fault wants to merge 56 commits into
masterfrom
rework-settings

Conversation

@ur-fault
Copy link
Copy Markdown
Owner

@ur-fault ur-fault commented Jan 30, 2026

  • Split config into two files: user config and UI config managed by TMaze
    • Use layered config system, where values downstream override values upstream.
  • Support persisting settings from UI
  • Split config into multiple sections structs instead of one big struct
  • Reorganize options in the config/settings

New system uses macro for generation full and partial config structs.
- You can merge full + partial -> full
- Primitives merge by overriding
- Settings are split into sections allowing for easier management
config! now also has more features, namely supports custom attributes
on Partial struct fields.
… sources

New default settings use the new config model.
Using Tera templates, we can now generate default config with synced values from code, reducing duplication.
Default presets will stay inside the default config, but are not included in Default::default() one
so that they don't break merging. For tests to pass, presets are ignored in equality assertion.

We may instead just test their equality with hardcoded presets in test, or just include them inside
the context for Tera.
ur-fault added 7 commits May 8, 2026 09:57
We don't want to break configs for anyone using the older format, so we
support loading older configs on best-effort basis. Configs gained `meta`
with name, description, authors and such, in which is also `format_version`,
everything without specified `format_version` is supposed to be `1` so
as not to break anything.

We don't plan on supporting every version ever, when there is enough
time and new versions, we may drop older versions.

Also, we are bringing back named terminal color schemes.
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