Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added complete color theming support for Git #852

Merged
merged 3 commits into from
Jul 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Formatted src/color.rs to pass the cargo fmt check
Signed-off-by: k4yt3x <i@k4yt3x.com>
k4yt3x committed Jul 1, 2023

Verified

This commit was signed with the committer’s verified signature.
k4yt3x K4YT3X
commit 6ee2cd4466e395f4267ee182428a0cc8639b8936
40 changes: 30 additions & 10 deletions src/color.rs
Original file line number Diff line number Diff line change
@@ -127,16 +127,36 @@ impl Elem {
Elem::Links { valid: false } => theme.links.invalid,
Elem::Links { valid: true } => theme.links.valid,

Elem::GitStatus { status: GitStatus::Default } => theme.git_status.default,
Elem::GitStatus { status: GitStatus::Unmodified } => theme.git_status.unmodified,
Elem::GitStatus { status: GitStatus::Ignored } => theme.git_status.ignored,
Elem::GitStatus { status: GitStatus::NewInIndex } => theme.git_status.new_in_index,
Elem::GitStatus { status: GitStatus::NewInWorkdir } => theme.git_status.new_in_workdir,
Elem::GitStatus { status: GitStatus::Typechange } => theme.git_status.typechange,
Elem::GitStatus { status: GitStatus::Deleted } => theme.git_status.deleted,
Elem::GitStatus { status: GitStatus::Renamed } => theme.git_status.renamed,
Elem::GitStatus { status: GitStatus::Modified } => theme.git_status.modified,
Elem::GitStatus { status: GitStatus::Conflicted } => theme.git_status.conflicted,
Elem::GitStatus {
status: GitStatus::Default,
} => theme.git_status.default,
Elem::GitStatus {
status: GitStatus::Unmodified,
} => theme.git_status.unmodified,
Elem::GitStatus {
status: GitStatus::Ignored,
} => theme.git_status.ignored,
Elem::GitStatus {
status: GitStatus::NewInIndex,
} => theme.git_status.new_in_index,
Elem::GitStatus {
status: GitStatus::NewInWorkdir,
} => theme.git_status.new_in_workdir,
Elem::GitStatus {
status: GitStatus::Typechange,
} => theme.git_status.typechange,
Elem::GitStatus {
status: GitStatus::Deleted,
} => theme.git_status.deleted,
Elem::GitStatus {
status: GitStatus::Renamed,
} => theme.git_status.renamed,
Elem::GitStatus {
status: GitStatus::Modified,
} => theme.git_status.modified,
Elem::GitStatus {
status: GitStatus::Conflicted,
} => theme.git_status.conflicted,
}
}
}