Skip to content

Keep defaults for unspecified configuration values - #131

Open
fuadsn wants to merge 1 commit into
ynqa:mainfrom
fuadsn:fix/partial-config-defaults-99
Open

fuadsn wants to merge 1 commit into
ynqa:mainfrom
fuadsn:fix/partial-config-defaults-99

Conversation

@fuadsn

@fuadsn fuadsn commented Dec 2, 2026

Copy link
Copy Markdown

A config that sets just one keybinding currently fails because the other fields are required. Start with the bundled TOML defaults and overlay only the keys in the user’s config. Arrays replace defaults, so [] still disables a binding. Invalid values still produce an error.

Fixes #99.

Testing: The single-keybinding and empty-binding regression tests failed on the old loader. After the change, all four tests passed, along with cargo fmt --all -- --check and cargo build --locked --bins. In a PTY, opened JSON using the one-key config from the README and exited with the unchanged Ctrl+C binding.

AI assistance: Codex.

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.

Request: Allow configuring only a single keybinding

1 participant