diff --git a/src/config.rs b/src/config.rs index 85da7ffa7..c74795634 100644 --- a/src/config.rs +++ b/src/config.rs @@ -75,19 +75,7 @@ fn env_base() -> config::Config { fn default_mergetool_config() -> config::Config { config::Config::builder() .add_source(config::File::from_str( - r#" - [merge-tools] - meld.merge-args = ["$left", "$base", "$right", - "-o", "$output", "--auto-merge"] - kdiff3.merge-args = ["$base", "$left", "$right", - "-o", "$output", "--auto"] - vimdiff.program = "vim" - vimdiff.merge-args = ["-f", "-d", "$output", "-M", - "$left", "$base", "$right", - "-c", "wincmd J", "-c", "set modifiable", - "-c", "set write"] - vimdiff.merge-tool-edits-conflict-markers=true - "#, + include_str!("merge-tools.toml"), config::FileFormat::Toml, )) .build() diff --git a/src/merge-tools.toml b/src/merge-tools.toml new file mode 100644 index 000000000..4d0569605 --- /dev/null +++ b/src/merge-tools.toml @@ -0,0 +1,11 @@ +[merge-tools] +meld.merge-args = ["$left", "$base", "$right", + "-o", "$output", "--auto-merge"] +kdiff3.merge-args = ["$base", "$left", "$right", + "-o", "$output", "--auto"] +vimdiff.program = "vim" +vimdiff.merge-args = ["-f", "-d", "$output", "-M", + "$left", "$base", "$right", + "-c", "wincmd J", "-c", "set modifiable", + "-c", "set write"] +vimdiff.merge-tool-edits-conflict-markers=true