diff options
author | Christian Duerr <contact@christianduerr.com> | 2023-06-12 02:23:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-12 00:23:41 +0000 |
commit | bd4906722a1a026b01f06c94c33b13ff63a7e044 (patch) | |
tree | a2713a7b0a5fa23ec8b9055d7ed06f1cede62447 /alacritty_terminal | |
parent | ea2c39e65d21728e0f04b0eafcec7153e4447cd5 (diff) | |
download | alacritty-bd4906722a1a026b01f06c94c33b13ff63a7e044.tar.gz alacritty-bd4906722a1a026b01f06c94c33b13ff63a7e044.zip |
Switch to TOML configuration format
This switches Alacritty's default configuration format from yaml to
toml. While yaml is still supported, it is done by converting it to toml
and should be removed entirely in the future.
All existing features were persisted based on my testing. Behavior
should not change much, though `--option` might have slightly different
behavior since the entire line is not interpreted as one line of toml.
A new `alacritty migrate` subcommand has been added which allows
automatic migration from yaml to toml. This also could be used as a
facility to automatically fix configuration file changes in the future.
Closes #6592.
Diffstat (limited to 'alacritty_terminal')
-rw-r--r-- | alacritty_terminal/Cargo.toml | 1 | ||||
-rw-r--r-- | alacritty_terminal/src/ansi.rs | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/alacritty_terminal/Cargo.toml b/alacritty_terminal/Cargo.toml index 7d354f39..9844939f 100644 --- a/alacritty_terminal/Cargo.toml +++ b/alacritty_terminal/Cargo.toml @@ -29,6 +29,7 @@ parking_lot = "0.12.0" regex-automata = "0.1.9" serde = { version = "1", features = ["derive", "rc"] } serde_yaml = "0.8" +toml = "0.7.1" unicode-width = "0.1" vte = { version = "0.11.1", default-features = false, features = ["ansi", "serde"] } diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs index b596cc82..5a28bda5 100644 --- a/alacritty_terminal/src/ansi.rs +++ b/alacritty_terminal/src/ansi.rs @@ -52,11 +52,7 @@ impl<'de> serde::Deserialize<'de> for CursorShapeShim { } impl alacritty_config::SerdeReplace for CursorShapeShim { - fn replace( - &mut self, - key: &str, - value: serde_yaml::Value, - ) -> Result<(), Box<dyn std::error::Error>> { + fn replace(&mut self, key: &str, value: toml::Value) -> Result<(), Box<dyn std::error::Error>> { if !key.is_empty() { return Err(format!("Fields \"{0}\" do not exist", key).into()); } |