summaryrefslogtreecommitdiff
path: root/alacritty_config
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2023-06-12 02:23:41 +0200
committerGitHub <noreply@github.com>2023-06-12 00:23:41 +0000
commitbd4906722a1a026b01f06c94c33b13ff63a7e044 (patch)
treea2713a7b0a5fa23ec8b9055d7ed06f1cede62447 /alacritty_config
parentea2c39e65d21728e0f04b0eafcec7153e4447cd5 (diff)
downloadalacritty-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_config')
-rw-r--r--alacritty_config/Cargo.toml2
-rw-r--r--alacritty_config/src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/alacritty_config/Cargo.toml b/alacritty_config/Cargo.toml
index 995edfa1..b7ed5658 100644
--- a/alacritty_config/Cargo.toml
+++ b/alacritty_config/Cargo.toml
@@ -10,8 +10,8 @@ rust-version = "1.65.0"
[dependencies]
log = { version = "0.4.17", features = ["serde"] }
-serde_yaml = "0.8.24"
serde = "1.0.163"
+toml = "0.7.1"
[target.'cfg(target_os = "macos")'.dependencies]
winit = { version = "0.28.2", default-features = false, features = ["serde"] }
diff --git a/alacritty_config/src/lib.rs b/alacritty_config/src/lib.rs
index 5ed9e1a5..c9d73622 100644
--- a/alacritty_config/src/lib.rs
+++ b/alacritty_config/src/lib.rs
@@ -3,7 +3,7 @@ use std::error::Error;
use log::LevelFilter;
use serde::Deserialize;
-use serde_yaml::Value;
+use toml::Value;
pub trait SerdeReplace {
fn replace(&mut self, key: &str, value: Value) -> Result<(), Box<dyn Error>>;