It's now possible to specify a validation function for config
items.
Use that to validate line_height:
```
; ./target/debug/wezterm --config line_height=-1
08:41:10.576 ERROR wezterm > Error converting lua value from overrides to Config struct: Error processing Config::line_height: Illegal value -1 for line_height; it must be positive and greater than zero!; terminating
```
refs: https://github.com/wez/wezterm/issues/2247
The issue here was that the from_dynamic impl derived for a struct
that was inlined in an enum didn't respect the the field properties
defined for the struct.
Refactor to reuse the same field_info helper used by the struct
code.
Update docs to clarify what the default value actually is.
refs: https://github.com/wez/wezterm/issues/2179
Invalid option names, or values that evaluate as nil (such as the `foo`
above: that's treated as a global variable reference, but `foo` isn't a
defined global and evaluates as `nil`) will now cause the program
startup to error out with an actionable error message.
Previously, the invalid config name would generate a warning, and the
invalid value would silently have no effect as it has the same effect as
omitting the named value and leaving it as its default value.
I think these cases should both immediately error out and stop
further processing, so that's what we're doing.
This commit also adds support for adding:
```
#[dynamic(deprecated = "use newer option instead")]
pub some_config_value: bool,
```
but not options currently use this.