diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-06-28 14:44:09 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-06-28 14:44:09 -0400 |
commit | 07a1faca2bb5f57119e114f8223cab1f044f1949 (patch) | |
tree | 160f559e6cf691319059d8af8971f97423cb5c50 /src/features | |
parent | 27d3a141b4110165fff48379592dccf9d0bb5625 (diff) |
Make diff-highlight honor more color.diff.* entries
See https://github.com/dandavison/delta/issues/205#issuecomment-650796993
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/diff_highlight.rs | 36 | ||||
-rw-r--r-- | src/features/diff_so_fancy.rs | 6 |
2 files changed, 36 insertions, 6 deletions
diff --git a/src/features/diff_highlight.rs b/src/features/diff_highlight.rs index fa4cba1e..20554fde 100644 --- a/src/features/diff_highlight.rs +++ b/src/features/diff_highlight.rs @@ -7,6 +7,42 @@ pub fn make_feature() -> Vec<(String, OptionValueFunction)> { pub fn _make_feature(bold: bool) -> Vec<(String, OptionValueFunction)> { builtin_feature!([ ( + "commit-style", + String, + Some("color.diff.commit"), + _opt => "none" + ), + ( + "commit-decoration-style", + String, + None, + _opt => "none" + ), + ( + "file-style", + String, + Some("color.diff.meta"), + _opt => "none" + ), + ( + "file-decoration-style", + String, + None, + _opt => "none" + ), + ( + "hunk-header-style", + String, + Some("color.diff.frag"), + _opt => "bold syntax" + ), + ( + "hunk-header-decoration-style", + String, + None, + _opt => "magenta box" + ), + ( "minus-style", String, Some("color.diff.old"), diff --git a/src/features/diff_so_fancy.rs b/src/features/diff_so_fancy.rs index bba2b07c..5132829c 100644 --- a/src/features/diff_so_fancy.rs +++ b/src/features/diff_so_fancy.rs @@ -23,12 +23,6 @@ pub fn make_feature() -> Vec<(String, OptionValueFunction)> { _opt => "bold yellow" ), ( - "commit-decoration-style", - String, - None, - _opt => "none" - ), - ( "file-style", String, Some("color.diff.meta"), |